Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MySQL RDS Cheat Sheet

MySQL RDS Cheat Sheet

1. Install the Command Line Client

On Ubuntu

sudo apt-get install mysql-client

2. Use the command-line client to connect

The below command will connect to the rds server specified after -h and open a MySQL client connection that you can run commands against.

mysql -h myrds.gobbledygook.us-west-1.rds.amazonaws.com -umyaccount -p mysql

3. Troubleshooting Replication Errors

Catch these quickly! If you don't, then running these commands will be pointless.

This will tell you what data is causing the replication error.

show slave status\G

This will clear the errored replication and alert you if there is more.

CALL mysql.rds_skip_repl_error;

4. Remote Host Blocked

If MySQL is telling you to run mysqladmin flush-hosts, this command doesn't appear to work. Intead use:

flush hosts;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.