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.

How to backup a mysql from SSH?

Discussion in 'General Discussion' started by helpme123, Feb 3, 2013.

  1. helpme123

    helpme123 Member

    Joined:
    Sep 26, 2012
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    So i've spent so much time for solution, but didn't found any.

    I connect via ssh and do this command :
    mysqldump -u admin -p mypassword database_name > sdfsdf.sql

    But i always get this error
    Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect

    Although the password is right, and it is the same as i use for login.


    Someone knows the solution?
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
  3. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    use root as the username instead of admin
     
  4. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    As root you can do:

    mysqldump database_name > sdfsdf.sql
     
Loading...

Share This Page