Database import loads database structure and data from an external source into a target database. A common migration moves a MySQL dump from an on-premises WordPress installation into Amazon RDS. section 10.2
Use this migration sequence:
- Export the source database into a dump file, commonly with the MySQL mysqldump command-line tool. section 10.2
- Start a virtual machine in the same AWS Region and VPC as the target RDS database. section 10.2
- Upload the dump to the virtual machine, then run the MySQL client against the RDS endpoint. section 10.2
Import a WordPress dump
Download the dump and import it through the target database account: mysql --host $DBAddress --user wordpress -p < wordpress-import.sql section 10.2
$ mysqldump -u $UserName -p --all-databases > dump.sql
Browse a command that exports all MySQL databases to dump.sql; related listings cover selective and network exports. section 10.2
