How to import and export a mysql database using ssh.

by
Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0StumbleUpon0

Question :How to import and export a mysql database using ssh.

 

Answer :

     To export a database use:

 

            mysqldump -u root -p db-name > backup.sql 

To import a database:

        mysql -u root -p db-name < backup.sql

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0StumbleUpon0