Mysql character set modification and viewing problems bitsCN.com
Modification and viewing of Mysql character set
Modify and view the character set of the mysql database
Modify my. cnf
Vi/etc/my. cnf
Add under [client]
Default-character-set =
1, display the current encoding informationMysql>show variables like '%character% '+--------------------------+----------------------------+| variable_name | Value |+--------------------------+----------------------------+| character_set_client |
1 Character Set issuesProblem: Executing the./manage.py createdb command in Django appears:Django.db.utils.OperationalError: (1366, "Incorrect string value: ' \\xC4\\x9A\\xC2\\x81vi ... ' for column ' file ' at row 1" )To view the MySQL
First, MySQL's character set problem is mainly two concepts, one is character sets, one is collations, the former is character contentand coding, which are some of the rules for comparing operations on the former. These two parameter sets can be
MYSQL entry 5: MYSQL Character Set link: MYSQL Entry 1: basic operations http://www.bkjia.com/database/201212/173868.htmlMYSQL Entry 2: Search Using Regular Expressions http://www.bkjia.com/database/201212/173869.htmlMYSQL Entry 3: Full Text Search
If you do not configure the MySQL environment variable in cmd, then in the system advanced settings where the MySQL environment variable settings. 2
Win+r, pull up "run", enter CMD, carriage return
3
Log in to the database,
4
View Database
Recently, in the project group used by the MySQL database, the insertion of data garbled, on this issue to make a summary, we start from the most basic point, to the root causes of errors and solutions.Basic concepts• The character (Character)
Transferred from: http://www.cnblogs.com/discuss/articles/1862248.htmlRecently, in the project group used by the MySQL database, the insertion of data garbled, on this issue to make a summary, we start from the most basic point, to the root causes
Modify and view the character set of the MySQL databaseModify my. CNFVI/etc/My. CNFAdd under [client]Default-character-set = utf8Add under [mysqld]Default-character-set = utf8
5. View Character Set settingsMysql> show variables like 'collation _ % ';
MySQL database default encoding has been utf8, default-character-setutf8, but to the database table to insert Chinese, but always appear .... xB5xA5xD1xA1forcolumn... after checking the online errors, I found a wonderful phenomenon. Next, let's
MySQL default character set modification method may not be everyone, the following describes the two most common ways to modify the default MySQL character set, for your reference to learn.Can the MySQL default character set be modified? The answer
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
Can the MySQL default character set be modified? The answer is yes, the following will teach you two ways to modify the MySQL default character set, you want to learn the MySQL default character set can be enlightened.(1) The simplest method of
(1) The simplest modification method is to modify mysql's my. INI file character set key value, such as default-character-setutf8character_set_serverutf8 after modification, restart mysql service, servicemysqlrestart using
Question mark (Chinese) is displayed after ubuntu is deployed in java.
1. First, remember the encoding format of your project, that is, the encoding format used for local encoding. UTF-82. Check tomcat settings in web. xml and server:Server.
To save the trouble in the future, we can modify the mysql garbled characters in the configuration file under RHEL6.3. My mysql configuration file is/etc/my. cnf1. first find [mysqld] in the configuration file and add the following line: [mysqld]
Recently, in the MySQL database used by the project team, garbled characters are inserted into the data. We have summarized this issue, starting from the most basic point, to the deep-seated problem
Recently, in the MySQL database used by the
We can use show variables like character to view character encoding in mysql. modify the configuration method in my. ini. Let's take a look at it.
Recently, in the mysql database used by the project team, garbled data is inserted. We have summarized
MySQL databaseThe following problems often occur in stored procedures:
1. garbled storage information, especially by executing SQL scripts to add data.
2. The where clause is used to compare Chinese strings, which is also very common.
To solve the
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.