MySQL won't start - a couple fixes

Posted on April 8th, 2010 by David Luhman and tagged .

Let's say you get this message while Linux is booting :

   Starting MySQL database server mysqld     [fail]

One possible cause may be a network setting in /etc/mysql/my.cnf. Look for the following :


    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address    = 127.0.0.1

Change the bind address to your static IP address if necessary.

Start MySQL with

    $ sudo /etc/init.d/mysql start

Another fix is to ensure that the directory /var/run/mysqld is owned (or at least writable) by user mysql. That directory holds the mysqld.sock and other files needed for execution.

Finally, MySQL won't be able to start if your disk partition has run out of space. Try running 'df -h' and see if you have sufficient disk space.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options