mysqldump is a MySQL command-line utility that exports databases into SQL dump files for backup or transfer. section 10.2
Use the MySQL client tools to export all databases, one database, or a database reached through a network host. Enter the password when prompted. section 10.2
Common export forms include:
- Export every database from localhost into dump.sql. section 10.2
- Export one named database into dump.sql. section 10.2
- Export a database from a remote host by supplying its hostname or IP address. section 10.2
Moving a database to RDS
Upload the dump to a virtual machine in the same AWS Region and VPC as the RDS instance, then import it from that machine. This avoids the slower transfer caused by higher internet or VPN latency. section 10.2
$ mysqldump -u $UserName -p --all-databases > dump.sql
Shows the command for exporting all databases into dump.sql. section 10.2
