Problem one: When we do the database operation, we will find that the table in the database is encoded with UTF-8, but the DOS command is to use set names GBK(a) The default character set in MySQL is four levels: server level, database level, table
First of all, the MySQL character set problem. Windows can be modified by modifying the My.ini in the
# CLIENT Section
[MySQL]
Default-character-set=utf8
# SERVER Section
[Mysqld]
Default-character-set=utf8
These
repinted: http://blog.csdn.net/class1/archive/2006/12/30/1469298.aspxIn order for your Web page to display properly on more servers, add "SET NAMES UTF8". (You can choose the appropriate encoding according to your preference, such as gb2312) , even
We often use the"Set names utf8", Why is this sentence added?CodeCan this be solved? Next, let's dive into the internal execution principle of set names utf8.
Let's talk about the character set of MySQL. In Windows, you can modify PHP code
[MySQL]
Introduction: This is a detailed page of MySQL database encoding problem 3 (modifying the database, table, and field encoding to utf8). It introduces the related knowledge, skills, and experience of PHP, and some PHP source code.
Class = 'pingjiaf'
Recently, I am doing a project deployment, this project is nginx for the front-end agent two Tomcat node, through the Mysql-proxy proxy access to two master-slave MySQL database.The entire project was deployed, tested and found to be garbled in
Mysql statement: set names UTF8 has always known only mysql_query ("set names UTF8"); it sets the database encoding, but it has never been clear what "set names UTF8" is. It is not until today that the set names... is a mysql statement. I really
One, character set and validation rulesA character set is a set of conformance and encoding, a set of rules that are used to compare characters within a character set, that is, the collation of a character set. MySQL can use the pair of character
several character sets involved in MySQL
Character-set-server/default-character-set: Server character set, by default.
Character-set-database: Database character set.
Character-set-table: Database table character Set.
Priority increases in order.
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.