How to use sudo to download database?

Discussion in 'MySQL' started by InvestInPixels, Jan 14, 2014.

  1. #1
    Hi there,

    I managed to get into my Amazon instance and have used the command cd /var/lib/mysql to get to the mysql folder.

    Now I would like to download everything inside OR download just the database. I tried using this command: sudo mysqldump -all databases

    But this error returned:
    mysqldump: Got error: 2002: Can't connect to local MySQL server through socket
    '/var/lib/mysql/mysql.sock' (2) when trying to connect

    Any help is really appreciated :)!
     
    InvestInPixels, Jan 14, 2014 IP
  2. Johnnt Nguyen

    Johnnt Nguyen Member

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    46
    #2
    You sure your mysql still running?
     
    Johnnt Nguyen, Jan 22, 2014 IP
  3. InvestInPixels

    InvestInPixels Member

    Messages:
    500
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    45
    #3
    Nope, the mysql database was inactive. I've sorted it out now though!

    Thanks for the help guys.
     
    InvestInPixels, Jan 23, 2014 IP