The following articles mainly describe the actual solutions to MySQL5.0 Chinese problems. We operate on it in the dos environment. If you are interested in the actual operations related to MySQL5.0 Chinese problems, you can click to view the following articles.
1. In the dos environment, use mysql -- default-character-set = utf8-u root-p to enter mysql ~~
2. mysql> show variables like 'character \ _ set \ _ % ';
- character_set_client utf8
- character_set_connection utf8
- character_set_database utf8
- character_set_results utf8
- character_set_server utf8
- character_set_system utf8
- mysql> set character_set_results=gbk;
- mysql> set character_set_client=gbk;
- mysql> show variables like 'character\_set\_%';
- character_set_client gbk
- character_set_connection utf8
- character_set_database utf8
- character_set_results gbk
- character_set_server utf8
- character_set_system utf8
3. create databases and tables as follows:
- Mysql> create database demo;
- Mysql> use demo;
- Mysql> create table user (id int (11) not null auto_increment primary key,
- Name varchar (100) not Null, age int) type = MyISAM, default character set utf8;
- Insert into user (name, age) values ('current job ', 19 );
- Insert into user (name, age) values ('zhangyun', 22 );
- Insert into user (name, age) values ('wang zuo', 29 );