Today I had a little drama. I noticed that one of my servers was not working at all since the MySQL server was down. Initially I thought that maybe it was a problem of lack of free space in the hard drive. But it wasn’t. I am running CentOS in a 1and1 virtualserver.
This is the problem:
$ service mysqld restart
Stopping mysqld: [ OK ]
Another MySQL daemon already running with the same unix socket.
Starting mysqld: [FAILED]
So I started searching and found the solution:
$ mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak
$ service mysqld start
Starting mysqld: [OK]
This sorted it out nicely 🙂
Thanks to GeckoSEO for his solution in StackOverflow http://stackoverflow.com/questions/20407292/centos-another-mysql-daemon-already-running-with-the-same-unix-socket
If you need to know what is happening with your server, check-out the Apache logs here:
you will find somethint like this:
and so on
to see the logs in real time:
tail -f /etc/httpd/logs/access_log
this command f.e. will show you the access log that are currently happening in your site
I just experienced a major server breakdown in 1and1. MySQL crashed and when I tried to restart it the result would be negative:
Then I restarted the server and the problem persisted.
So my third action was to have a look at my Parallels Plesk web panel, and the result was that it would not load, showing a MySQL problem.
I then figured out that the problem could be a lack of memory, so I entered with ssh to the server and started listing directory sizes, using the great “du” linux command:
du -h –max-depth=1
until i found that the problem was in the backups folder:
then I deleted one of the backup folders and could restart mysql
service mysqld restart
Thanks to this guide for the du parameters: http://www.linfo.org/du.html