Currently we are using the following commands in PHP to set the character set to UTF-8 in our application.
Since this is a bit of overhead, we\'d like to set this a
Change MySQL character:
default-character-set=utf8
character_set_server=utf8
We should not write default-character-set=utf8 in mysqld, because that could result in an error like:
start: Job failed to start
At last:
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+