The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error: MySQL will not start

Discussion in 'General Discussion' started by lblanchardiii, Apr 4, 2008.

  1. lblanchardiii

    lblanchardiii Well-Known Member

    Joined:
    Nov 20, 2005
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Fresh Install, just setup clean two days ago. :mad:

    Basically I am moving from shared hosting to dedicated hosting, so I zipped up all my files and moved them to my new dedicated server. Once I got them all there, I extracted them. Then I went to setup the database through phpmyadmin for the forums and for some reason it would not create a new username or password, so I logged into WHM:

    WHM 11.15.0 cPanel 11.18.3-R21703
    CENTOS Enterprise 5 i686 on standard - WHM X v3.1.0

    This is what I get when I try to restart mysql within' the WHM control panel.

    Code:
    /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").
    When going to phpmyadmin within' the WHM I get this message:

    Code:
     MySQL said: Documentation
    #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured) 
    and

    Code:
    phpMyAdmin was unable to read your configuration file!
    This might happen if PHP finds a parse error in it or PHP cannot find the file.
    Please call the configuration file directly using the link below and read the PHP error message(s) that you receive. In most cases a quote or a semicolon is missing somewhere.
    If you receive a blank page, everything is fine.
    
    ./config.inc.php
    I click the link and all I see is;
    Code:
    Starting to parse config file...
    
    I have no idea what the heck the problem is.

    Shouldn't all this work straight out the box on a cPanel installed server?
     
  2. lblanchardiii

    lblanchardiii Well-Known Member

    Joined:
    Nov 20, 2005
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    After checking the mysql log file, it said something about missing the user mysql. :confused:

    After adding the user, seems I am able to start mysql without any errors, however phpmyadmin still refuses to work. All of the errors above still occur.
     
    #2 lblanchardiii, Apr 4, 2008
    Last edited: Apr 4, 2008
  3. Dannyblaze

    Dannyblaze Member
    PartnerNOC

    Joined:
    Sep 28, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Gatineau, Quebec, Canada
    Hi lblanchardiii,

    Just noticed your post was still not answered.
    You could try the following for starters... it never hurts

    Code:
    /scripts/upcp --force
    /scripts/mysqlup --force
    Hope that helps! If not, let us know! :D
     
  4. LiNUxG0d

    LiNUxG0d Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    206
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gatineau, Quebec, Canada
    To follow-up as well,

    Did you add this user using `useradd`? If so, chances are the ownerships of the files will be off. The mysql user is usually userid 100 with groupid 101. On most of my systems anyway. ;) It's possible that some files are owned by the user 100 right now but new users are something upwards of 32000...

    That could be the culprit.

    Just thought you'd like another lead,
     
  5. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    did you edit my.cnf ?

    generally when someone edits my.cnf this can become a problem.

    another lead hopefully.

    worse case here is a suggestion...

    1. remove mysql users
    2. yum remove mysql
    3. mv /etc/my.cnf /etc/my.cnf.old
    4. /scripts/mysqlup --force


    Hope that helps

    :)
     
  6. lblanchardiii

    lblanchardiii Well-Known Member

    Joined:
    Nov 20, 2005
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6

    You my friend, are a life saver! Thanks greatly for solving the problem for me.

    Everyone else thanks for lending other solutions!! :cool::cool::cool::cool::cool::cool::cool:
     
Loading...

Share This Page