Follow

Can I manage databases via SSH? (Mysql)

SSH is very good at both import and export MySQL databases with MySQL command, so you can do both: Export a MySQL db to file:

mysqldump -h [SERVER] -u [username] -p [DATABASE]> dump.sql

This above command exports your database and save it as "dump.sql".

 Importing a MySQL db from file:

mysql -h [SERVER] -u [username] -p [dATABASE] <dump.sql

This above command will import your dump file to the database, the will overwrite existing tables with the same name.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.