MySQL Character Set and verification set
I. Character Set
1. MySQL's Character Set settings are flexible
You can set the default Character Set of the server;
Default Character Set of the database;
The default Character Set of the table;
Column
1, first need to modify the MySQL database configuration file My.ini, this file is placed in the MySQL root directory. Look for the Default-character-set property under this file and change its value to UTF8 ( Note: Not utf-8, also note case ), You
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. Therefore, in general, you only need to set
Brief Description
Character set and proofing rules
A character set is a set of symbols and encodings. A proofing rule is a set of rules used to compare characters within a character set.
MySQL in collation to provide strong support, oracel in this
Author:skatetime:2013/04/09MySQL Character set summaryToday colleague Jie brother found inside a MySQL test server garbled, previously also recorded about the character set, and today to addModifying the MySQL character set and default storage
1. View the default character set (by default, MySQL's character set is Latin1 (Iso_8859_1), and the settings for viewing the system's character set and ordering can be set through the following two commands:Mysql>SHOW VARIABLES like 'character%';+--
CentOS Setup MySQL Character setVim ETC/MY.CNFModified to read as follows:[Client]port=3306Socket=/var/lib/mysql/mysql.sockDefault-character-set=utf8[Mysqld]Datadir=/var/lib/mysqlSocket=/var/lib/mysql/mysql.sockUser=mysql# Disabling Symbolic-links
InMySQLClient andMySQLThere is a character set converter between the service side. Character_set_client =>GBK: The converter knows that the client is sending a GBK format encoding character_set_connection=> GBK: Convert the data sent from the
first, what is a character set :To put it simply, a character set is a set of corresponding relationships;1, the current computer is built on the basis of binary system, binary is a numerical expression, that is, binary only expression "number",
The environment of this experiment:Linux systems:Cat/etc/redhat-releaseCentOS Release 6.5 (Final)Database environment:Select version ();+------------+| Version () |+------------+| 5.5.32-log |+------------+The process of simulating a database that
Originally in the 5.1 version, in order to solve the Chinese garbled problem set the default character set is UTF8, in the My.ini in the [MySQL] and [mysqld] entries are written:INI Code
Default-character-set=utf8
In the 5.5 version, [MySQL]
To help colleagues deal with a tricky thing today, the problem is this:Regardless of which version of the MySQL client the client uses to connect to the server, it finds that the server-side settingCharacter-set-server =
A pit of the MySQL character setHttp://imysql.com/2013/10/29/misunderstand-about-charset-handshake.shtmlA pit of the MySQL character set 1 repliesTo help colleagues deal with a tricky thing today, the problem is this:Regardless of which version of
Let's talk about MySQL. When compiling the installation, the options for the character set (http://coosh.blog.51cto.com/6334375/1735271)Specify the default character set for the database-ddefault_charset=utf8Specify the default proofing character
1. View Character Set settingsMysql> Show variables like ' collation_% '; +----------------------+--------------------+| variable_name | Value |+----------------------+--------------------+| collation_connection | Utf8mb4_unicode_ci | |
Test under MySQL 5.1.5-alpha to the conclusionLatin1:1character=1byte, 1 kanji =2character,In other words, a field is defined as varchar (200), it can store 100 characters or 200 letters.This should be noted, especially when the field content is
Basic Concepts • Character refers to the smallest semantic symbol in human language. For example, 'A' and 'B;• Given a series of characters, each character is assigned a value, which is used to represent the corresponding character. This value is
Basic Concepts • Character refers to the smallest semantic symbol in human language. For example, 'A' and 'B;• Given a series of characters, each character is assigned a value, which is used to represent the corresponding character. This value is
Mysql character set and verification analysis use case first let's look at an example: there is a user table www.2cto.com User (username VARCHAR (5) character set utf8COLLATE utf8_general_ci); There is a record ('username '); and ('username'); Use
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.