Several MySQL garbled problem handling

Source: Internet
Author: User
Keywords Network programming Mysql tutorial
Tags create mysql mysql tutorial network network programming php php tutorial programming

Several mysql tutorial garbled problem handling
1 set php tutorial myadmin

language: chinese simplified (zh-utf-8)

mysql character set: utf-8 unicode (utf8)

mysql connection proofing: gbk_chinese_ci

2 when creating a database tutorial

Finishing set to gbk_chinese_ci

3 sql create table

engine = myisam default charset = gbk;
engine = innodb default charset = gbk auto_increment = 40;

4 Checklist structure

The finishing attribute of varchar (100) is gbk_chinese_ci
Other types of finishing attributes are empty

Plus 5 code

$ db-> query ("set character set gbk"); under linux, windows do not need this equivalent to connection character sets and collations

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.