Summary of viewing and modifying mysql encoding and data table Encoding

Source: Internet
Author: User

1. Check the encoding of your installed mysql.

2. Check the encoding supported by Mysql.

3. view the database code

4. view the data table encoding (show create table user \ G ;)

5. Modify the my. ini file to modify the encoding: add the default-character-set = character set (utf8.gbk. gb2312, etc)

6. Modify the command line: alter database da_name default character set "charset"; or set names 'charset'; or alter database testdb character set utf8;

8. view the character set of the Database Service and client:

9. Modifications in Linux: <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + records/bK/records + CjxwPjIpsum/tLW8s/records + NCnBrL3Tyv2 + 3b/isqKy6b + 0 tbHHsL/records + records = "gbk';

6) view the current Encoding
Mysql> status;
Server characterset: latin1
Db characterset: gbk
Client characterset: gbk
Conn. characterset: gbk

7) import the file converted to gbk
Mysql> source base_user_gbk. SQL;


Related Article

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.