1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Problem] - Cannot restart mysql

Discussion in 'Web Hosting' started by lossehelin, Sep 5, 2012.

  1. lossehelin

    lossehelin Junior Member

    Joined:
    May 23, 2009
    Messages:
    195
    Likes Received:
    47
    This is to all fellow bhw owners of vps and servers.

    I have a vps which has been working fine till today. I noticed that my sites couldn't connect to mysql. Went to my shell and i see the processes are not running. I try to restart mysql but keeps saying FAIL.

    I noticed that the mysql.sock file is not present.
    Any suggestions?
     
  2. paullopez

    paullopez Junior Member

    Joined:
    Dec 16, 2010
    Messages:
    169
    Likes Received:
    23
    Occupation:
    Sales & Marketing Representative @bodHOST.com
    Location:
    bodHOST.com
    Home Page:
    Rename your current my.cnf file. (Actual path will be /etc/my.cnf) to say my.cnf-BAK and try restarting Mysql.

    Even if it do not works then open that my.cnf file and add following line

    socket=/var/lib/mysql/mysql.sock

    I hope this will resolve your problem.
     
    Last edited: Sep 5, 2012
  3. lossehelin

    lossehelin Junior Member

    Joined:
    May 23, 2009
    Messages:
    195
    Likes Received:
    47
    thanks for the input but that didn't work.

    i already had socket=/var/lib/mysql/mysql.sock in the my.cnf though
     
  4. ADHD-Dude

    ADHD-Dude Power Member

    Joined:
    Apr 17, 2010
    Messages:
    592
    Likes Received:
    119
    move the databases and reinstall mysql