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!

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:
    11
    Trophy Points:
    168
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,696
    Likes Received:
    71
    Trophy Points:
    203
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    use root as the username instead of admin
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. quietFinn

    quietFinn Well-Known Member

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

    mysqldump database_name > sdfsdf.sql
     
    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