This document discusses administration of MySQL databases in Amazon RDS. It begins by explaining that RDS makes it easy to setup, manage, and scale relational databases in the cloud. It then provides details on creating RDS instances, setting up security groups and parameter groups. It notes some limitations of RDS including restrictions on replication, upgrades, and schema changes. It also discusses dumping users and data from RDS as well as handling DDL operations and failures. It concludes by comparing costs of RDS versus self-managed databases on EC2.
2. What is RDS
"Amazon Relational Database Service is a
web service that makes it easy to set up,
operate, and scale a relational database in
the cloud."
3. Why use RDS
1) Easy to set up
2) Flexibility/Scalability/Pay as you go
3) Easy to create replicas
4) Multiple AZ
5) Easy Admin/backups
17. Limitations
Slow Query Logs (blog on how to do it)
http://www.palominodb.com/blog/2011/10/20/exporting-
mysqlslowlog-table-slow-query-log-format
MySQL upgrades
Schema changes
Replication out of RDS
19. Dumping Users
pt-show-grants -OR-
mysql --host=olddatabasehost -BNe "select
concat(''',user,''@'',host,''') from mysql.user where user
not like 'rds%' and user != 'master'" |
while read uh; do mysql --host=olddatabasehost -BNe
"show grants for $uh" | sed 's/$/;/; s///g'; done >
user_grants.sql
http://www.villescorner.com/2012/11/mysqldump-from-
amazon-rds-headaches-of.html
21. DDL
No option to alter slave and swap with master
Blocking DDL
OSC tools (no OS access)
show table status like '%blah%';
Lots more on OSC tomorrow (B @ 2pm)
22. DDL
What do you do if you really break replication?
CALL mysql.rds_skip_repl_error;
Recreate replica(s)
one at a time
possible to rename