I'm running MySQL on AWS RDS, does anyone know how to set the character set there to UTF-8?
-
Doesnt mysql already have utf-8 as default?http://stackoverflow.com/questions/1049728/how-do-i-see-what-character-set-a-mysql-database-table-column-is – Mihai Apr 03 '16 at 20:51
2 Answers
You can modify the database parameters through the AWS GUI/CLI or you can just create your tables with the required character set. (The Table character set does not need to match your database character set, nor match your column's character set)
E.g.
CREATE TABLE t1
(
c1 CHAR(10) CHARACTER SET utf8mb4
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Here I've used utf8mb4
, which supports the full Unicode set, including Emojis, which MySQL's utf8
does not.

- 26,573
- 8
- 77
- 100
I actually wanted to change the settings for the whole database. There's no way to do it after the DB is created, however, during the DB creation via AWS RDS console, it's just a matter of selecting the right Parameter Group. If you only have the default Parameter Group, just go to Parameter Groups section to create your specific one setting the right "character set" and then use that group.
So, this basically solves my problem.

- 1,216
- 1
- 12
- 25