The data written to mysql through SQLyog (SQLyog is utf8, after connecting to the database, execute mysql_query("set names utf8")), after the data is written successfully, read and write information in the SQLyog page, normal.
But in the command line window, select * from `grade`; shows that the data just inserted is garbled.
After multiple inquiries, I learned that the command line window does not support utf8.
After connecting to the database on the command line, execute set names GBK;
Then query the data, the Chinese records can be displayed normally.