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 while connecting to MySQL. Failover enacted.

Discussion in 'General Discussion' started by m0rpheu5, Oct 10, 2005.

  1. m0rpheu5

    m0rpheu5 Well-Known Member

    Joined:
    Jun 16, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brazil, Curitiba/PR
    cPanel Access Level:
    Root Administrator
    i got a server, and when i create a new accout, a erros shows me, this erros is:
    Error while connecting to MySQL. Failover enacted.

    I would like to know what can i do to fix this error??

    Thanks
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Seems to suggest that MySQL isn't running. Have you checked that it is running and working?
     
  3. m0rpheu5

    m0rpheu5 Well-Known Member

    Joined:
    Jun 16, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brazil, Curitiba/PR
    cPanel Access Level:
    Root Administrator
    yes, the mysql is running. i can open phpmyadmin, i can see the processes of mysql, but when a create a new account this erros shows, and when i access the client account, the same erros show in the left side of his cpanel.
     
  4. luisp

    luisp Well-Known Member
    PartnerNOC

    Joined:
    Jan 17, 2003
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Portugal
    cPanel Access Level:
    DataCenter Provider
    same problem here. Any fix for this?
     
  5. m0rpheu5

    m0rpheu5 Well-Known Member

    Joined:
    Jun 16, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brazil, Curitiba/PR
    cPanel Access Level:
    Root Administrator
    i had backup to mysql 4.0 and upgrade to 4.1 and reboot my server, and the problem have been fixed
     
  6. luisp

    luisp Well-Known Member
    PartnerNOC

    Joined:
    Jan 17, 2003
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Portugal
    cPanel Access Level:
    DataCenter Provider
    Hello,

    How do you update? i run /scripts/mysqlup --force but didnt work :(
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You upgrade MySQL using WHM > Tweak Settings > Follow the advice and select the option for MySQL 4.1
     
  8. m0rpheu5

    m0rpheu5 Well-Known Member

    Joined:
    Jun 16, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Brazil, Curitiba/PR
    cPanel Access Level:
    Root Administrator
    I thought that the problem was fixed, but i can't create a user or a data base, so i try to upgrade again, and the error come backup, the error is: Error while connecting to MySQL. Failover enacted.

    what could be?
     
  9. Game Wizards

    Game Wizards Active Member

    Joined:
    Apr 6, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Did you manage to get this fixed? I'm having the same problem.
     
  10. yawsh

    yawsh Well-Known Member

    Joined:
    Jun 20, 2004
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    I have the same problem here today.

    What I did is upgrading my server from mysql 4 to 4.1 in WHM tweak setting. Then Started to have this problem.

    What I did to fix the problem.

    Down grade mysql to 4 in WHM tweak setting (run the upcp after 30 sec)

    then again upgraded it to 4.1

    after that run those 3 commands in ssh.
    Code:
    /scripts/mysqlup
    Code:
    /scripts/easyapache
    Choosed #5

    Code:
    /scripts/perlinstaller --force Bundle::DBD::mysql
    Now everthing is working fine 100%

    Regards
    Yawsh
     
  11. Game Wizards

    Game Wizards Active Member

    Joined:
    Apr 6, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Thanks,

    I'll give this a go now.
     
  12. Game Wizards

    Game Wizards Active Member

    Joined:
    Apr 6, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Thanks! This fixed it. :)
     
  13. yawsh

    yawsh Well-Known Member

    Joined:
    Jun 20, 2004
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    Welcome ... glad to hear that :)
     
  14. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    I am having this same issue but the commands are not resolving it. When I perform a "/scripts/mysqlup" it immediately goes to the prompt again in fact without running any scripts.
     
  15. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    I also just gave /scripts/perlinstaller --force DBD::mysql a shot which results in:

    Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
     
  16. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If the following also comes straight back to the prompt:

    /scripts/mysqlup --force

    Then try:

    rm -fv /etc/mysqldisable
    /scripts/mysqlup --force
     
  17. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    I just tried

    rm -fv /etc/mysqldisable
    /scripts/mysqlup --force

    Still imediately goes back to the prompt.


     
  18. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    My mistake:

    rm -fv /etc/mysqlupdisable
    /scripts/mysqlup --force
     
  19. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    Delicious! Running now.
     
  20. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    Receiving the following near the end of the script:

    Converting all privilege tables to MyISAM format
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    If your tables are already up to date or partially up to date you will
    get some warnings about 'Duplicated column name'. You can safely ignore these!
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    Creating Grant Alter and Index privileges if they don't exists
    You can ignore any Duplicate column errors
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    Adding columns needed by GRANT .. REQUIRE (openssl)
    You can ignore any Duplicate column errors
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    Creating the new table and column privilege tables
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    Changing name of columns_priv.Type -> columns_priv.Column_priv
    You can ignore any Unknown column errors from this
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    Fixing the func table
    You can ignore any Duplicate column errors
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    Adding new fields used by MySQL 4.0.2 to the privilege tables
    You can ignore any Duplicate column errors
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    Waiting for mysql to restart..............finished.


    /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").
    /usr/sbin/setfiles: read 2 specifications
    /usr/sbin/setfiles: labeling files under /
    /usr/sbin/setfiles: hash table stats: 1 elements, 1/65536 buckets used, longest chain length 1
    /usr/sbin/setfiles: Done.


    Restarting mysql results in the same of course:
    /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").


    So I went to go out and rebuild the sock file:

    rm -f /tmp/mysql.sock
    rm -f /var/tmp/mysql.sock
    /etc/init.d/mysql stop (stopping mysql resulted in the proceding)

    No mysqld pid file found. Looked for /var/lib/mysql/myhostname.com.pid.

    killall -9 mysqld (results in the proceding)
    mysqld: no process killed
     
    #20 Solokron, Apr 27, 2006
    Last edited: Apr 27, 2006
Loading...

Share This Page