Export MySQL database via SSH

Faraz Ahmed October 25, 2012 1
Export MySQL database via SSH

There are several ways to export database, one of most useful tool to export database is PHPMyAdmin however it takes lot of time, there are some other tools also available in Cpanel control panel to export MySQL database locally and if you want to export database from one server to another it will take a lot of time to export database via PHPMyAdmin locally and then upload and import database on another server.

The easiest way to export database on server is to use SSH shell command for MySQL export. This can be done very easily.

 

1. Login to your server.

2. Export MySQL database via SSH command.

mysqldump –opt -u database-username -ppassword database-name > export-filename.sql

Note:

1. Do not put space between -p and password.

2. Do not disconnect SSH client during export process.

It will take few minutes to import database (depend on your server resources and size of database).

Incoming search terms:

Related Posts:

One Comment »

  1. @imfaraz October 25, 2012 at 4:38 am - Reply

    Export MySQL database via SSH: There are several ways to export database, one of most useful tool to export data… http://t.co/7T1VJ0Iz

Leave A Response »