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 server

Discussion in 'General Discussion' started by German Dad, Nov 7, 2008.

  1. German Dad

    German Dad Member

    Joined:
    Nov 6, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello all,

    some how after a new installation of the cpanel software my mysql dont work.
    I can`t add mysql databases with a cpanel user account also can`t Reset Local MySQL Root Password.


    If I restart the msql server I get this message:

    Please help! What can I do so the mysql server wil work again
     
  2. lngtanseco

    lngtanseco Well-Known Member

    Joined:
    Jun 9, 2006
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    Have you tried /scripts/upcp --force ?

    Other options:
    Try to reset MySQL via shell if that doesn't work try resetting it via WHM. If that doesn't work either, reboot the server.
     
  3. linux.newbie

    linux.newbie Well-Known Member

    Joined:
    Sep 8, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    Do ps awux | grep mysql and kill the mysql processes
    Then do a restart :: /scripts/restartsrv_mysql
    Ensure that the sock file is created and linked correctly to /tmp
     
  4. apscinsspl

    apscinsspl Well-Known Member

    Joined:
    Mar 15, 2008
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    To start mysql do the following steps

    killall -9 mysqld
    cd /etc/rc.d/init.d
    safe_mysqld --skip-grant-tables &
    Ctrl+C
    mysqladmin status


    and mysql should be running.
     
  5. hzJayJ

    hzJayJ Well-Known Member

    Joined:
    Nov 14, 2008
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock

    If you are getting the error message : "Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock" The fix for this issue is very simple

    Check your /etc/my.cnf file

    =====
    [mysqld]
    datadir=/usr/local/mysql/data
    socket=/var/lib/mysql/mysql.sock

    [mysql.server]
    user=mysql
    basedir=/usr/local/mysql

    =========

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

    If you don't find the client portion in the file add or edit the socket line as appropriate. After that restart the services. This will fix the issue.
     
  6. KarenP

    KarenP Member

    Joined:
    Oct 9, 2008
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock

    do check for mysql.sock file under /tmp and /var/lib/mysql.

    In /var/lib/mysql you can touch the mysql.sock file If not present
    touch mysql.sock

    create a symlink in /tmp for mysql.sock ...
    ln -s /var/lib/mysql/mysql.sock mysql.sock

    restart the mysql
    /scripts/restartsrv_mysql
     
Loading...

Share This Page