Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

'root@localhost' (Using password: YES) at /usr/local/cpanel/Cpanel/Mysql.pm line 42".

Discussion in 'General Discussion' started by tvmt, Aug 9, 2004.

  1. tvmt

    tvmt Registered

    Joined:
    Feb 29, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    Hi !

    i have error with mysql database.

    i set my Setup to Remote MySQL server on cpanel = IP, but unsuccess.
    when i change mysql server to localhost, i get error : all database disappear in mysql (cpanel interface), i can see it in phpmyadmin.

    and this is error in mysql:
    DBI connect('mysql:localhost','root',...) failed: Access denied for user: 'root@localhost' (Using password: YES) at /usr/local/cpanel/Cpanel/Mysql.pm line 42 ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

    i can using database for normal.

    how i can correct this?

    please help me!
     
  2. NrgUser

    NrgUser Member

    Joined:
    Jan 25, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    root@localhost means that you are trying to connect with user root on your own server, not the other one.
     
  3. xanaduservers

    xanaduservers Member

    Joined:
    Apr 30, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    151
    For anyone else seeing this open /root/.my.cnf on your cPanel server and on the remote server then verify the password.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Divino

    Divino Member

    Joined:
    Jan 6, 2006
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    151
    Help DBI connect

    In the SQL Services.
    I changed the password in: MySQL Root Passwd

    :confused:
    DBI connect('mysql:localhost','root',...) failed: Access denied for user 'root'@'localhost' to database 'mysql' at /usr/local/cpanel/Cpanel/Mysql.pm line 42

    Can anybody help myself to revolve?

    Thanks
     
  5. Grzeslaw

    Grzeslaw Well-Known Member

    Joined:
    Jul 11, 2006
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    158
    Location:
    Poland
    1. Edit the file /root/.my.cnf
    2. Use the mysql root password in the file and reset the mysql password to that password in .my.cnf file.
    Code:
    /etc/init.d/mysqld stop
    safe_mysqld --skip-grant-tables
    mysql
    USE mysql
    UPDATE user
    SET password=password("Password in .my.cnf file")
    WHERE user="root";
    flush privileges;
    exit;
    killall mysqld 
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Divino

    Divino Member

    Joined:
    Jan 6, 2006
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    151
    Thanks

    He/she perfectly worked.

    Thanks.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice