Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Feb 2004
    Posts
    2

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

    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. #2
    Member
    Join Date
    Jan 2004
    Posts
    8

    Default

    root@localhost means that you are trying to connect with user root on your own server, not the other one.

  3. #3
    Member
    Join Date
    Apr 2006
    Posts
    7

    Default

    For anyone else seeing this open /root/.my.cnf on your cPanel server and on the remote server then verify the password.

  4. #4
    Member
    Join Date
    Jan 2006
    Posts
    18

    Unhappy Help DBI connect

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


    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. #5
    Member
    Join Date
    Jul 2006
    Location
    Poland
    Posts
    76

    Default

    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. #6
    Member
    Join Date
    Jan 2006
    Posts
    18

    Talking Thanks

    He/she perfectly worked.

    Thanks.

Similar Threads & Tags
Similar threads

  1. Replies: 2
    Last Post: 09-29-2010, 07:27 PM
  2. Died at /usr/local/cpanel/Cpanel/CpKeyClt.pm line 132
    By hscorp in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-13-2009, 10:06 AM
  3. Replies: 1
    Last Post: 06-22-2009, 09:29 AM
  4. commandline like "Reset Local MySQL Root Password" in whm
    By gundamz in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-28-2008, 11:29 PM
  5. "Reset Local MySQL Root Password" does not work.
    By gopederick in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-12-2004, 08:21 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube