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.

Mysqldump issue

Discussion in 'Database Discussions' started by Cody Brown, Mar 20, 2017.

Tags:
  1. Cody Brown

    Cody Brown Member

    Joined:
    Jul 27, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Kentucky
    cPanel Access Level:
    Root Administrator
    I changed my Cpanel account password for the account associated with my https//:IP:2083 link and now my database backup script keeps failing with the error :

    mysqldump: Got error: 1045: Access denied for user 'USER'@'localhost' (using password: YES) when trying to connect.

    The credentials for this mysql user are still the same if I use them on the command line.

    mysqldump --defaults-extra-file=CONFIG.FILE -uUSER DATABASE| gzip > file.sql.gz

    This command has worked fine for years now, but after changing the password to the cpanel account, I can not seem to fix this issue. I did notice that cpanel placed my new username and password in the same config file that I use for mysqldump under a [client] line. I moved the config to a new place with the same permissions and removed the client section, and that did not seem to fix the problem either. Any ideas?
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    543
    Likes Received:
    39
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi,
    It seems that the issue with password or PRIVILEGES.

    First make sure the password is correct. You have to check using the following command.

    Code:
    mysql -u USERNAME -p
    
    after issuing the command it asks for a password.
     
  3. Cody Brown

    Cody Brown Member

    Joined:
    Jul 27, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Kentucky
    cPanel Access Level:
    Root Administrator
    The grants and password are all exactly the same as they were before. I am able to log in to mysql using the original username and password from command line. I have enabled "GRANT SELECT, CREATE, REFERENCES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER" grants and they have worked just fine in the past
     
  4. sktest123

    sktest123 Well-Known Member

    Joined:
    Jan 31, 2017
    Messages:
    69
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    kochin
    cPanel Access Level:
    Root Administrator
    please update your Cpanel account password via the WHM Root interface , then try
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,086
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can also try updating the MySQL user password if you prefer it to be different than the cPanel account password:

    "WHM Home » SQL Services » Change MySQL User Password"

    Thank you.
     
Loading...

Share This Page