Migrate Data into a MySQL Deployment

If you would like to migrate your data into MySQL deployment, the following steps may help you clear the obstacles in the migration process.

1.Export data from source instance

Connect the source instance from an authorized account and export data from the source instance by executing the command![]

 mysqldump -h <domain name> -P <port> -u<dbuser> -p<dbpassword> <database_name> > <backup file path>

Take the following command as an example to export your database and generate a backup file named mysqldump-20190228.sql.

 mysqldump -h mysql-1168-0.cloudclusters.net -P <port> -uiris -p123 irisdb1 > /data/mysqldump-20190228.sql

2. Import data into MySQL deployment

Execute command

 mysql -h <domain name> -P <port> -u<dbuser> -p<dbpassword> <database_name> < <backup file path>

to import all data in the above backup file into MySQL deployment. Take the following command as an example to import your data.

mysql -h host -P port -u dbuser -ppassword dbname < /data/mysqldump-20190228.sql
Copyright © 2021 Cloud Clusters Inc. all right reserved,powered by GitbookRevised on 04/01/2021

results matching ""

    No results matching ""