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 + phpMyAdmin

Discussion in 'Database Discussions' started by xbuzz, Jan 5, 2006.

  1. xbuzz

    xbuzz Member

    Joined:
    Nov 26, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    MySQL and phpMyAdmin are not functioning properally. When I select "phpMyAdmin" from "WHM" I recieve the following error message from phpMyAdmin

    Wrong username/password. Access denied.

    I reset the password and it appears to be correct even in /root/.my.cnf

    When I log into the server via shell as root and type "mysql -u root" I get the following error message.

    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    Any help would greatly be appreciated!
     
  2. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    on shell as root type:

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

    then check to see if there are any errors specified.
     
  3. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Set the permissions of /tmp directory to 1777 and also check whether the mysql.sock is present in the /tmp, if not, do the following :-
    chmod 1777 /tmp
    ln -s /var/lib/mysql/mysql.sock /tmp
    service mysql restart

    If the above doesn't fix the issue, execute the below script :-
    /scripts/mysqlup --force
     
  4. xbuzz

    xbuzz Member

    Joined:
    Nov 26, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    i just ran that script and the problem still exists. additionally i ran "updatedb" and then typed "locate mysql.sock" nothing was found. any ideas???

    thanks for the reply
     
  5. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Try adding the below lines in /etc/my.cnf
    [mysqld]
    datadir=/var/lib/mysql
    socket=/tmp/mysql.sock
    [client]
    socket=/tmp/mysql.sock

    and restart Mysql as given by :-
    /etc/rc.d/init.d/mysql restart

    Else paste the output of the below command :-
    /var/lib/mysql/bin/mysqld_safe &
    or
    /usr/bin/mysqld_safe &
     
  6. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
Loading...

Share This Page