Home>

How to solve the garbled problem of mysql 5 0 16?This article gives the solution:Q:How to solve the garbled characters of mysql 5.0.16?

Answer:The garbled characters of mysql 5.0.16 can be solved by the following methods:

1.Set up phpmyadmin

language:chinese simplified (zh-utf-8)

mysql character set:utf-8 unicode (utf8)

mysql connection proofreading gbk_chinese_ci

2. When creating the database

Finishing is set to gbk_chinese_ci

3. Use sql to create the table

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

4. Check the table structure

The collation attribute of varchar (100) is gbk_chinese_ci

Other types of collation attributes are empty.

5. Add in the code

$db->query ("set character set gbk");

Required under linux, not under windows.

This operation is equivalent toconnection character sets and collations

  • Previous Introduction to C # Programming Self-study
  • Next Method for accessing image files in C # operation database