...
Stop all activity to your MyISAM tables (that is, close all sessions). You can close all sessions by calling the mysql.rds_kill command for each process that is returned from a MySQL SHOW FULL PROCESSLIST command.
- Lock and flush each of your MyISAM tables. For example, the following command locks and flush two tables named myisam_table1 and myisam_table2:
- FLUSH TABLES myisam_table, myisam_table2 WITH READ LOCK;
- Create a snapshot of the RDS instance.
- Release the locks on the tables.
- UNLOCK TABLES;
The lock-and-snap.rb script in https://github.com/CU-CommunityApps/docker-mysql-util attempts to follow this procedure to lock-and-flush MyISAM tables before creating and RDS snapshot.
Warning |
---|
We are in the process of understanding this process in greater detail. Be aware that your database may have MyISAM tables in the internal schemas MySQL uses for operations. Initial trials suggest that this sequence, as recommended by AWS, does not work. We have found that the snapshot will not proceed until the MySQL session holding the locks releases the locks or exits.flushing-and-locking those tables along with your own tables will block the snapshot from beginning (or at least completing). Snapshot creation times seem nominal if only your own MyISAM tables are flushed-and-locked, leaving out the internal MyISAM tables. Read Replicas
|
Resources
- Amazon Relational Database Service User Guide. This document has a fair amount to say about MyISAM tables–mostly warnings.
- AWS RDS FAQs. Search for MyISAM on the page)