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!

mysqldump

Discussion in 'Data Protection' started by xml, Jan 5, 2015.

  1. xml

    xml Well-Known Member

    Joined:
    Jan 15, 2004
    Messages:
    85
    Likes Received:
    1
    Trophy Points:
    158
    Hello

    from user account shell and for years I been using this comandline
    mysqldump --opt -Q –uusername –ppassword database_name > Backup.sql

    lately that comandline isnt working any more and get this error message:
    mysqldump: Got error: 1044: Access denied for user 'user'@'localhost' to database '–uusername' when selecting the database

    But I found this comandline is working:
    mysqldump --opt -Q database_name > Backup.sql

    why the first comandline is not working any more? and why the second comandline is working without username and password, isnt it security risk?


    CENTOS 6.6 x86_64 standard
    WHM 11.44.1 (build 23)
     
    #1 xml, Jan 5, 2015
    Last edited: Jan 5, 2015
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,962
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    You should already have authenticated into the account when you accessed SSH so you should be able to simply run:

    Code:
    mysqldump --opt -Q database_name > Backup.sql
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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