Hello guys,
actually the problem could happened due to permissions also.
I checked the owners of the directory "/var/run/mysqld" using
#ls -lah
and I got the following results:
drwxr-xr-x 2 mysql root 40 2011-04-17 07:42
so I changed the owners to be mysql user and mysql group, using:
#chown mysql.mysql . -R
then I restarted mysql and it worked fine for me.
same thing happened to me and i tried many things but it didn't work at last it worked after typing the following command:
apt-get install mysql-server
mysql_secure_installation
mysql -u root -p
you may chech the following link for details:
http://library.linode.com/lamp-guide...tu-10.04-lucid
Ok, I've gone through EVERY single suggestion and linked tutorial on this post, as well as numerous other posts I've Googled, and after all that, I still get:
Ack!!!!! I want to set up MythTV as a DVB tuner/recorder backend for XBMC, and it requires mysql-server. It gives me this error (as does anything else I try to do with mysql-server) and says "No UPnP". I am about to chuck my laptop out of my 2nd-story window!!!Code:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
Hey. I was having a similar error when trying to access mysql at the command line. I look in the error.log (/var/log/mysql/error.log) and saw that I was having the following issue:
I went into the my.cnf file (/etc/mysql/my.cnf) and found this line:Code:111027 6:20:29 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address 111027 6:20:29 [ERROR] Do you already have another mysqld server running on port: 3306 ? 111027 6:20:29 [ERROR] Aborting
I'm not sure why it was bound to this IP address but it might have something to do with the configuration of my VM. I commented this line out and restarted mysql (service mysql start) and it works again.Code:bind-address = 192.168.1.121
Hope that helps someone!
Hi, i have the error
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) linux
after upgrading ubuntu from 11.04 to 11.10
The problem was caused by the apparmor daemon.
I just changed the lines in /etc/apparmor.d/usr.sbin.mysqld
- /var/run/mysqld/mysqld.pid w,
- /var/run/mysqld/mysqld.sock w,
to
+ /{,var/}run/mysqld/mysqld.pid w,
+ /{,var/}run/mysqld/mysqld.sock w,
and restarted appamor daemnon with
/etc/init.d/appamor restart
After restarting mysql daemon everthing works fine
/etc/init.d/mysql restart
Perhapps it help you
I had the same problem:
Nov 23 17:54:45 server /etc/init.d/mysql[13117]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Nov 23 17:54:45 server /etc/init.d/mysql[13117]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Finally, I note that in the file /etc/mysql/my.cnf specified IP was wrong because I had changed the IP of the server host recently.
Thank you so much walli!! After upgrading to 11.10 I had the same issue... Thankfully I found your post or I could have spent hours trying to figure it out.
Hi to all! I also had such problem:
The solution was to change the bind-adress to 127.0.0.1 in /etc/mysql/my.cnfCode:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Thanks to CriticalBandwidth for idea (#45)!
Last edited by sidewinder01; April 15th, 2012 at 07:16 PM.
too old to live.
I am infallible, you should know that by now.
"My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
(02:15:31 PM) ***TimToady and snake oil go way back...
42 lines of Perl - SHI - Home Site
Bookmarks