Export Data from MySQL
To export your MySQL database, use the following MySQL command:
mysqldump -u root -p database_name > database_name.sql
database\_name is the name of your existing database.
is the name of the exported database file.
If your database resides on a remote host (as it would if you’re using
Cloud Databases), specify the hostname with the
mysqldump -h host_name -u username -p database_name > database_name.sql
Note: In this command, insert the username that you created.
You can also set the
MYSQL\_HOST environment variable to the
remote host’s address so that you don’t have to enter it on the command line.
If you want to import this data to another database, see Import data into Cloud Databases.
The following external link provides additional information:
©2020 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License