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 problem Need Help FAST

Discussion in 'General Discussion' started by ewunia, Aug 31, 2007.

  1. ewunia

    ewunia Registered

    Joined:
    Aug 31, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I move the database from /var/lib/mysql to a new location /homee2/mysql. I can start the database and I can see databases from WHM, chage passwords for databases, login as root.

    However new problem occured.
    1. I can't see the list of databases for specific domain (user).
    2. when I try to add new database it is added as Cpanel::Mysql=HASH(0xa489468) instead of the name of the database
    3. I can't access phpMyAdmin from WHM and I get the error:
    #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)


    This is also log from Cpanel:

    DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) at /usr/local/cpanel/Cpanel/Mysql.pm line 29
    Fri Aug 31 06:11:54 2007 info [Cpanel::Mysql]: Creating MySQL database Cpanel::Mysql=HASH(0xa222680) for user kinggame
    Fri Aug 31 06:11:54 2007 info [Cpanel::Mysql]: Not updating privileges for kinggame (reseller login and no password specified in ~/.my.cnf) at /usr/local/cpanel/Cpanel/Mysql.pm line 254
    Cpanel::Mysql::updateprivs('Cpanel::Mysql=HASH(0xa222680)') called at /usr/local/cpanel/Cpanel/Mysql.pm line 129
    Cpanel::Mysql::create_db('Cpanel::Mysql=HASH(0xa222680)', 'kinggame_tptestdb') called at /usr/local/cpanel/bin/mysqladmin line 242

    Can anyone help me to solve it?
     
    #1 ewunia, Aug 31, 2007
    Last edited: Aug 31, 2007
  2. Silver_2000

    Silver_2000 Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    338
    Likes Received:
    1
    Trophy Points:
    18
    Why did you move them ?
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Just a friendly note: moving MySQL from /var/lib/mysql is strongly NOT recommended.
     
  4. ewunia

    ewunia Registered

    Joined:
    Aug 31, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I moved the database because the /var/lib/mysql was full and there was no space there at all. And my service is growing fast. I had to move database to new location.

    Cpanel WHM can see the databases for each domain. However they are not listed for the Cpanel users also phpMyAdmin is giving me problems. I described what is going on in the first post.

    I looked throug the error messages and I changed the dir location in Mysql.pm. I am rebooting the server now.
     
    #4 ewunia, Aug 31, 2007
    Last edited: Aug 31, 2007
  5. ewunia

    ewunia Registered

    Joined:
    Aug 31, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    The solution was quite easy. My datacenter support just created the symlink:
    ln -s /home2/mysql/mysql.sock /var/lib/mysql/mysql.sock

    and it solved all issues above.

    This is just for reference for others with similar problems.
     
Loading...

Share This Page