参考:
- http://www.2cto.com/os/201504/394141.html
- http://outofmemory.cn/code-snippet/2533/mysql-create-database-specify-utf-8-coding
- https://mariadb.com/kb/en/mariadb/setting-character-sets-and-collations/
yum install mariadb mariadb-server
systemctl status mariadb.service
systemctl enable mariadb.service
systemctl start mariadb.service
mysql_secure_installation
mysql -uroot -p
MariaDB> show variables like 'collation_%';
MariaDB> show variables like 'character_set_%';
MariaDB> set collation_database='utf8_general_ci';
MariaDB> set collation_server='utf8_general_ci';
MariaDB> show variables like 'collation_%';
MariaDB> show variables like 'character_set_%';
MariaDB> CREATE DATABASE IF NOT EXISTS yourdbname DEFAULT CHARSET utf8 COLLATE utf8_general_ci;