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

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

  1. xml

    xml Well-Known Member

    Joined:
    Jan 15, 2004
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,676
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     

Share This Page