Today you have the latest mysql, want to change the character set is utf-8 to prevent the Chinese insert garbled data, and consequently there is no my.cnf configuration file, change it's useless (manual laugh cry).
Correct posture:
1.vim edit /etc/mysql/mysql.conf.d/mysqld.cnf
2. [mysqld] add = Save character_set_server behind utf8 quit
3. # Service restart MySQL
4. Log mysql #mysql -u root -p after mysql> show variables like 'character%' to see if the coding have become utf8, if there is a failure latin coding.