Friday 13 September 2013

Django OperationalError 2019 Can't initialize character set utf8mb4

Django OperationalError 2019 Can't initialize character set utf8mb4

I have struggled with this all day and have not been able to find a
solution or even the root cause of the error. When I run my app locally it
works fine. My production instance is using Heroku cedar stack and Amazon
RDS MySQL databases.
In my settings file I have: 'OPTIONS': {'charset': 'utf8mb4'}
When I push to Heroku it crashes with the error:
_mysql_exceptions.OperationalError: (2019, "Can't initialize character set
utf8mb4 (path: /usr/share/mysql/charsets/)")
The exception location:
/app/.heroku/python/lib/python2.7/site-packages/MySQLdb/connections.py in
set_character_set, line 298
I have created the appropriate Data Base parameters with Amazon RDS MySQL
and are currently set as follows:
+--------------------------+-------------------------------------------+
| Variable_name | Value |
+--------------------------+-------------------------------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| character_sets_dir | /rdsdbbin/mysql-5.6.13.R1/share/charsets/ |
+--------------------------+-------------------------------------------+
I am running:
MySQL 5.6.13
MySQL-python==1.2.4
Thanks in advance for your help. Let me know if there are more details
that I am missing.

No comments:

Post a Comment