Skip to content

Instantly share code, notes, and snippets.

@amccarty
Created March 10, 2016 20:48
Show Gist options
  • Save amccarty/86aa3873d9baa40c7482 to your computer and use it in GitHub Desktop.
Save amccarty/86aa3873d9baa40c7482 to your computer and use it in GitHub Desktop.
Amazon RDS uft8 encoding
aws rds create-db-parameter-group --db-parameter-group-name mysql-utf8 --db-parameter-group-family mysql5.6 --description "MySQL 5.6 configured for UTF-8"
aws rds modify-db-parameter-group --db-parameter-group-name mysql-utf8 \
--parameters="ParameterName=character_set_server, ParameterValue=utf8, ApplyMethod=immediate" \
--parameters="ParameterName=character_set_client, ParameterValue=utf8, ApplyMethod=immediate" \
--parameters="ParameterName=character_set_results, ParameterValue=utf8, ApplyMethod=immediate" \
--parameters="ParameterName=collation_server, ParameterValue=utf8_unicode_ci, ApplyMethod=immediate" \
--parameters="ParameterName=collation_connection, ParameterValue=utf8_unicode_ci, ApplyMethod=immediate"
# Apply to an existing instance (followed by a reboot):
aws rds modify-db-instance --db-instance-identifier DB_NAME --db-parameter-group-name mysql-utf8
aws rds reboot-db-instance --db-instance-identifier DB_NAME
@neo-silicon
Copy link

neo-silicon commented Nov 28, 2018

Doesn't work for mysql8 RDS. Gonna look at tweaking it.
EDIT: Just changed the family to mysql8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment