Assume you are using Windows command line. The default encoding of the Windows command line is GBK, and the content stored in MySQL is encoded in UTF-8, so it will be garbled when displayed.
List 3 solutions:
Specify the encoding for connecting to MySQL:
> mysql.exe -uroot -p --default-character-set=gbk
Specify the MySQL encoding after connecting:
mysql> set names gbk;
Modify Windows command line character encoding to UTF-8:
Assume you are using Windows command line. The default encoding of the Windows command line is GBK, and the content stored in MySQL is encoded in UTF-8, so it will be garbled when displayed.
List 3 solutions:
Specify the encoding for connecting to MySQL:
Specify the MySQL encoding after connecting:
Modify Windows command line character encoding to UTF-8:
Look at what the sorting rules were when you created the database. Set it to this and try it
utf8_general_ci
set names utf8;
Unify the encoding rules of the database to utf-8 and it should be fine
First check whether the encoding format of your database is utf-8, if not, change it to utf-8
Let me ask, is your terminal a terminal under Linux or a command line under Windows? The default under Windows is GBK, which is of course gibberish
The Linux system you are using does not support Chinese. . . Just set it up to support Chinese. . .