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, please help

Discussion in 'General Discussion' started by SebastianC, Nov 3, 2004.

  1. SebastianC

    SebastianC Active Member

    Joined:
    Nov 25, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Hello:

    I have restore my OS (fedora) and Cpanel today. All is working fine, but MySQL can´t start. In VHM when I try to restart MySQL, I have this error:

    ----------------
    DBI connect('mysql:localhost','root',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /scripts/restartsrv_mysql line 74 mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").
    ----------------

    At /var/lib/mysql/ I don't have the file mysql.sock, and neither inside my hard drive :confused:

    Any idea how can I fix it?

    Thanks in advance,

    Sebastian
     
  2. paolorulez

    paolorulez Guest

    symlink problem

    login root

    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

    restart mysql
     
  3. SebastianC

    SebastianC Active Member

    Joined:
    Nov 25, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Thanks paolorulez. Not working, the same error... :(
     
  4. paolorulez

    paolorulez Guest

    Shutdown the MySQL server and add these lines to your /etc/my.cnf file (if you don't have them already):

    [mysqld]
    socket=/var/lib/mysql/mysql.sock

    save ed exit

    service mysql stop or killall mysqld

    cd tmp

    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

    /etc/rc.d/init.d mysql restart


    Restart the server and it should work.
     
  5. SebastianC

    SebastianC Active Member

    Joined:
    Nov 25, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Sorry, that neither works... thanks any way...

    My /etc/my.cnf:

    ---------------------
    [mysqld]
    port=3306
    socket=/var/lib/mysql/mysql.sock
    set-variable = max_connections=500
    safe-show-database

    [client]
    port=3306
    socket=/var/lib/mysql/mysql.sock
    ---------------------

    The problem is (I think) that the file mysql.sock not exists inside the server

    root@host [~]# locate mysql.sock
    root@host [~]#
     
  6. jkims

    jkims Registered

    Joined:
    Jan 8, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    We had the same problem and tried all the fixes we could find on this forum but none of them seemed to work. Everytime we tried to start MYSQL the mysql.sock and all the symlinks for it would just disapear.

    We ended up just reloading MYSQL and the problem went away. The guys at fastservermanagement.com actually helped us out and did this for us.
     
  7. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
    There have been many mess ups on Mysql upgrades and there has been no info from cPanel on this.

    Anup
     
  8. paolorulez

    paolorulez Guest

  9. blade720

    blade720 Member

    Joined:
    Nov 1, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    hmmm anyone find a fix for this yet? this happened to me today on reboot of my server.
     
  10. paolorulez

    paolorulez Guest

    :D :D :D :D
     
  11. Angel78

    Angel78 Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    413
    Likes Received:
    1
    Trophy Points:
    16
    this is still not resolved (have to restart mysql 2 times to get it to work = to create sock file in /tmp)

    Latest Stable & RHE
     
  12. stuartj

    stuartj Member

    Joined:
    Jul 17, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Ive had this issue. The issue was the server could not connect to the cpanel mirror for mysql files in my case so I used another mirror and downloaded from

    http://mysql.mirror.ok.ee/Downloads/MySQL-4.0/?M=D

    RPMs you will need these to run a basic hosting server.

    MySQL-server-4.0.22-0.i386.rpm
    MySQL-embedded-4.0.22-0.i386.rpm
    MySQL-client-4.0.22-0.i386.rpm
    MySQL-devel-4.0.22-0.i386.rpm
    MySQL-bench-4.0.22-0.i386.rpm
    MySQL-shared-4.0.22-0.i386.rpm
    MySQL-shared-compat-4.0.22-0.i386.rpm

    wget these files and install them most importantly set the mysql root password at the end. This fixed my issue on a Fedora core 1 box and CentOS 3.3 and RH9 system ive setup tonight.

    Stuart
     
  13. server4sale

    server4sale Member

    Joined:
    Aug 6, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Try resetting password. It worked for us. Yes THAT IS crazy but it did work for us :)
     
  14. LP-Trel

    LP-Trel Well-Known Member

    Joined:
    Oct 13, 2003
    Messages:
    184
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Nirvana
    Try running..

    /scripts/updatenow

    then

    /scripts/restartsrv_mysql --check
     
  15. gordonrp

    gordonrp Member

    Joined:
    Oct 14, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem.

    I have tried all above and still get the error:

    Warning, no valid mysql.sock file found.
    mysql has failed

    Any ideas?

    tia
    gp
     
  16. Secret Agent

    Secret Agent Guest

    same problem here...any ideas?
     
  17. TDD

    TDD Active Member

    Joined:
    Dec 21, 2002
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    The issue was that /tmp was chmod to 755, so MySQL couldn't create it's temporary
    files. I chmod it to 777 and MySQL could start without error.
     
  18. ttiger

    ttiger Member

    Joined:
    Sep 1, 2004
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Why is there no fix for this? I have tried every single thing in this thread and a thousand others with no success.
     
  19. jezzzicuh

    jezzzicuh Registered

    Joined:
    Sep 11, 2002
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Me too

    I am having the exact same problem, and have tried everything as well. This seems to be a serious Cpanel issue, and I am shocked they have not provided better service with this.
     
  20. Secret Agent

    Secret Agent Guest

    bump...same here
     
Loading...

Share This Page