MySQL version
mysql Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (i386) using readline 5.1
Restarted the machine. Then tried...
$ ps aux | grep mysql
mysql 3298 0.0 0.8 136772 17216 ? Rl 12:13 0:00
/usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking
--socket=/var/lib/mysql/mysql.sock
xxxxx 3311 0.0 0.0 4000 680 pts/1 R+ 12:13 0:00
grep mysql
root 3461 2.3 0.0 4624 1232 ? S 11:55 0:26
/bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql
--socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log
--pid-file=/var/run/mysqld/mysqld.pid --user=mysql
So mysqld is running.
However I can't make a client connection to it...
$ mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (2)
When I try to connect from a different machine using Sequel Pro I get the error...
"MySQL said: Lost connection to MySQL server at 'reading initial communication packet', system error: 61"
The message
ERROR 2002 (HY000):
generally means that mysqld isn't running.From the comments : the message
"Error writing file '/var/run/mysqld/mysqld.pid'"
appears in mysql.logSolution:
The device holding your
/var
filesystem is full and the mysqld.pid file cannot be created so mysqld isn't starting.Create some space on your /var filesystem.
Try to run mysql using
mysqld_safe --console
from a command prompt, it won't detach from a terminal then. Check the console for errors, also check the logfile for errors too (it will print an absolute path to the logfile on the console, something like110818 23:53:57 mysqld_safe Logging to '/var/log/mysqld.log'.
). Of course you should stop your existing mysql instance before runningmysqld_safe --console
Kill the mysqld & mysqld_safe processes with kill (try with 15 first and if it cannot stop, try 9) and try to restart mysql then. Also make sure that mysql is not bind to a specific IP.
-$