Move an MySQL DB via SSH?

Is there a way to move a MySQL DB from my old web server to my Linode with out downloading the DB to my PC? In the past I've downloaded the DB via PHPMyAdmin to my PC and uploaded it to the new server but I would like to avoid doing that if at all possible.

Thanks in advance.

1 Reply

Change to whatever directory you want the DB file to end up in on your Linode and run

scp [login name@ip address] : [/path/filename] .

That assumes SSH on the remote server is on port 22.

Google/man for more command options with SCP.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct