These forums are read-only!
Cannot start mysql - "Can't connect to local MySQL server through socket"
  • I am getting the following error when starting mysql using 'sudo /etc/init.d/mysql start':

    Mar 15 16:33:56 MoodFishDev /etc/init.d/mysql[18317]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    Mar 15 16:33:56 MoodFishDev /etc/init.d/mysql[18317]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
    Mar 15 16:33:56 MoodFishDev /etc/init.d/mysql[18317]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Mar 15 16:33:56 MoodFishDev /etc/init.d/mysql[18317]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

    This is a cloned ubuntu 8.04 slice from slicehost. I have done this before and never had problems with the mysql installation. Any ideas? In major need of getting this started up.
  • I cannot find mysqld.sock anywhere on the server. This is like a dog trying to catch its tail, since starting mysql creates the mysqld.sock file.
  • Okay... problem is now solved. I forgot to set bind-address to the new IP of the cloned slice (in /etc/mysql/my.cnf)