Use of the system is fedora22, in the MYSQ official website in accordance with the steps used by the command DNF installed MySQL, in use, the direct creation of a database, Chinese is a question mark;
To view the encoded commands for a database:
Show variables like ' character% ';
The following is the encoding format that should be set after Utf-8.
Workaround: Modify the my.cnf file, this file in/etc/my.cnf, you can use the command: GEDIT/ETC/MY.CNF
When I open it, it's like this,
This is correct, I added three rows of data inside:
Collation-server = Utf8_unicode_ci
init-connect= ' SET NAMES UTF8 '
Character-set-server = UTF8
This is the three lines. After you add it, you need to restart the database. Also, the databases that you created before are all out of use, and you must delete the re-create database before you can display Chinese.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
MySQL cannot display Chinese under Fedora