Actual solution to MySQL5.0 Chinese problems

Source: Internet
Author: User
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-setutf8-uroot-p

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.

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 \ _ % ';

 
 
  1. character_set_client utf8
  2. character_set_connection utf8
  3. character_set_database utf8
  4. character_set_results utf8
  5. character_set_server utf8
  6. character_set_system utf8
  7. mysql> set character_set_results=gbk;
  8. mysql> set character_set_client=gbk;
  9. mysql> show variables like 'character\_set\_%';
  10. character_set_client gbk
  11. character_set_connection utf8
  12. character_set_database utf8
  13. character_set_results gbk
  14. character_set_server utf8
  15. character_set_system utf8

3. create databases and tables as follows:

 
 
  1. Mysql> create database demo;
  2. Mysql> use demo;
  3. Mysql> create table user (id int (11) not null auto_increment primary key,
  4. Name varchar (100) not Null, age int) type = MyISAM, default character set utf8;
  5. Insert into user (name, age) values ('current job ', 19 );
  6. Insert into user (name, age) values ('zhangyun', 22 );
  7. Insert into user (name, age) values ('wang zuo', 29 );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.