Exporting MySQL5 Database to a Managed Server
You can export MySQL databases located on your managed server using the SSH shell. Running the export via SSH shell is an alternative to running it via phpMyAdmin.
Establish a connection to your server via SSH.
To export, use the command line client mysql. The following example exports a MySQL5 database to the dump.sql file.
Please Note
For MySQL 5.1 databases, the socket /tmp/mysql5.sock belonging to MySQL 5.1 must also be specified. This step is not necessary for MySQL 5.5 databases.
For MySQL 5.1:
mysqldump --host=localhost --user=dbo123456789 --password=******** -S /tmp/mysql5.sock db123456789 > dump.sql
For MySQL 5.5:
mysqldump --host=localhost --user=dbo123456789 --password=******** db123456789 > dump.sql
Parameters | Description |
---|---|
--host= | Here localhost must remain |
--user= | your database username |
--password= | your database password |
/tmp/mysql5.sock | Necessary for MySQL5 databases. If you are still using MySQL4 databases, please ignore this addition. |
db123456789 | your database name |
dump.sql | The name of the backup file to import |