Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    1

    Default MySQL 5 - Connect to server at 'localhost' failed

    I just upgraded to MySQL 5, thought it was a good move for my hosting service... Wrong.

    I now get the error:
    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!
    Everytime i try to get WHM to reset MySQL (I also get "Starting MySQLCouldn't find MySQL manager or server " in SSH when trying manually).

    I've tried everything I can think of, and have gone through numerous sites online to no avail.

    Can someone help me please? I really need to get this up faster then cPanel's email support, but don't want to pay the telephone support premium.
    Thanks,
    -Steve

  2. #2
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Assuming you are on an RPM using system, what does:


    rpm -qa | grep -i mysql

    report?

    Also, what does the mount command return for the various tmp mounts. For example, on a sample system:

    Code:
    root@mundane [/home34y69da/tramel/.cpanel]# mount
    /dev/sda1 on / type ext3 (rw,usrquota)
    none on /proc type proc (rw)
    none on /sys type sysfs (rw)
    none on /dev/pts type devpts (rw,gid=5,mode=620)
    usbfs on /proc/bus/usb type usbfs (rw)
    none on /dev/shm type tmpfs (rw)
    /dev/sda4 on /images type ext3 (rw,usrquota)
    /dev/sda3 on /tmp type ext3 (rw,noexec,nosuid)
    /dev/sdb1 on /home34y69da type ext3 (rw,usrquota)
    none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
    /tmp on /var/tmp type none (rw,noexec,nosuid,bind)
    sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

    Is there anything in /etc/my.cnf that pertains to the sock file?


    Does /var/lib/mysql still exist?

    Does the mysql user exist on the system?

    Are there any specific errors in the /var/lib/mysql/systemname.err log?

Similar Threads & Tags
Similar threads

  1. mysqladmin: connect to server at 'localhost' failed
    By chips12 in forum Database Discussions
    Replies: 1
    Last Post: 11-19-2010, 06:41 AM
  2. /usr/bin/mysqladmin: connect to server at 'localhost' failed
    By Linux.RedHat in forum Database Discussions
    Replies: 2
    Last Post: 08-18-2010, 09:56 AM
  3. /usr/bin/mysqladmin: connect to server at 'localhost' failed
    By Linux.RedHat in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-18-2010, 09:56 AM
  4. /usr/bin/mysqladmin: connect to server at 'localhost' failed error:....
    By woody200456 in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 12-29-2006, 06:51 PM
  5. DBI connect('mysql:localhost','root',...) failed:
    By cbwass in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-08-2004, 06:30 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube