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.

'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:
    1
    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:
    1
    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:
    1
    For anyone else seeing this open /root/.my.cnf on your cPanel server and on the remote server then verify the password.
     
  4. Divino

    Divino Member

    Joined:
    Jan 6, 2006
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    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:
    6
    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 
    
     
  6. Divino

    Divino Member

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

    He/she perfectly worked.

    Thanks.
     
Loading...
Similar Threads - 'root@localhost' (Using password
  1. kmthayil
    Replies:
    5
    Views:
    714

Share This Page