About MySQL query command cmd in the process, Chinese is garbled, how to solve

Disclaimer: you can Oh, ha ha ha ha https://blog.csdn.net/qq_44084157/article/details/91527148

1. Open the first query command cmd run as administrator. And input mysql -u root -p, hit enter a password, the following screen appears
Here Insert Picture Description
2. Enter show databases; mysql database which will all appear.

Here Insert Picture Description
3, employees use the database
Here Insert Picture Description
4 using the database table inside the employees, before this database to look inside those tables, enter the command show tables;
State
can be seen in FIG Chinese distortion, because the client can not MySQL for utf_8 returns windows
we open Navicat View student table in the database and display garbled in table
Here Insert Picture Description
5. back cmd, enter select * from student table; then we will see L
Here Insert Picture Description
6. we only need to enter three statements can solve this problem,

Here Insert Picture Description
7. Finally, enter select * from student table; you can see
Here Insert Picture Description
at this time no longer see garbled,
we can query the students of the table data ·
8.decribe student table;
Here Insert Picture Description
this is how to solve the garbage, and I hope to Do you have help Oh! ! ! ! ! ! ! ! ! ! !

Guess you like

Origin blog.csdn.net/qq_44084157/article/details/91527148