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.

MySQL problems

Discussion in 'General Discussion' started by OllyM, Oct 9, 2005.

  1. OllyM

    OllyM Registered

    Joined:
    Aug 9, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I've searched the forum, but I can't seem to find a solution - I'm running the latest Stable release of cPanel (tried Release too, no difference), and MySQL just doesn't work properly:

    I get this when restarting MySQL in WHM:

    End user databases work, but people can't actually add databases or anything in cPanel, and it's a big problem :(

    How can I get it working properly again?
     
  2. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    SSH to the server

    Try /scripts/mysqlup --force.

    then try

    ps ax | grep mysql to see if the mysql is working. It might help.
     
  3. OllyM

    OllyM Registered

    Joined:
    Aug 9, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Done /scripts/mysqlup --force before, and I get:

    ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

    Adding new fields used by MySQL 4.0.2 to the privilege tables
    You can ignore any Duplicate column errors
    ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
    ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
    ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
    ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

    etc. etc.

    And yep, it is running:

    root@mars [~]# ps ax | grep mysql
    25056 pts/0 S 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/mars.miniserve.net.pid
    25088 pts/0 S 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mars.miniserve.net.pid --skip-locking --socket=/var/lib/mysql/mysql.sock
    25089 pts/0 S 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mars.miniserve.net.pid --skip-locking --socket=/var/lib/mysql/mysql.sock
    25090 pts/0 S 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mars.miniserve.net.pid --skip-locking --socket=/var/lib/mysql/mysql.sock
     
  4. aby

    aby Well-Known Member

    Joined:
    May 31, 2005
    Messages:
    638
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India


    At first try to reset the mysql password from the shell. You will get to know how to do that from a simple search. If that too working for you then you may try this.

    Kill -p mysql.pid

    then

    cp -fr /var/lib/mysql /var/lib/mysql.old

    rm -fr /var/lib/mysql

    rm -f /usr/sbin/mysqld

    /scripts/mysqlup --force


    Better luck.... if working... don't forget to move back the mysql folder.
     
  5. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Before moving the /var/lib/mysql directory, try to set or reset the mysql root password in WHM.
     
  6. OllyM

    OllyM Registered

    Joined:
    Aug 9, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Tried all of that, it still doesn't work :(

    There must be a solution, my customers really aren't happy that they can't edit or create databases at the moment :mad:

    Thanks for all your help so far, though.
     
  7. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Check the mysql logs. If you'd like me to take a look, feel free to contact me via an instant messenger (see sig) or PM.
     
Loading...

Share This Page