Use utf8mb4 for MySQL database charset

The default "utf8" character set for MySQL only supports up to
3-byte codepoints. In order to support text with 4-byte codepoints
(at the expense of some additional storage) explicitly use "utf8mb4"
instead when creating and connecting to the database.

Change-Id: I25bd7b5d2a904dad3e13efaf2da94cce205bcc0b
This commit is contained in:
Jeremy Stanley 2018-03-23 13:53:09 +00:00
parent 0940bd1e42
commit e5040616f3
2 changed files with 2 additions and 1 deletions

View File

@ -32,5 +32,6 @@ class storyboard::mysql (
password => $mysql_user_password,
host => 'localhost',
grant => ['all'],
charset => 'utf8mb4',
}
}

View File

@ -87,7 +87,7 @@ max_age=<%= @cors_max_age %>
# connection = mysql://root:pass@127.0.0.1:3306/storyboard
# Replace 127.0.0.1 above with the IP address of the database used by the
# main storyboard server. (Leave it as is if the database runs on this host.)
connection=mysql+pymysql://<%= @mysql_user %>:<%= @mysql_user_password %>@<%=@mysql_host %>:<%= @mysql_port %>/<%= @mysql_database %>
connection=mysql+pymysql://<%= @mysql_user %>:<%= @mysql_user_password %>@<%=@mysql_host %>:<%= @mysql_port %>/<%= @mysql_database %>?charset=utf8mb4
# The SQLAlchemy connection string used to connect to the slave database
# slave_connection =