MYSQL modified Chinese garbled/table name is not case-sensitive

Source: Internet
Author: User
Tags mysql version

The system is Ubuntu12.04 MySQL version is 5.5 If you are a different version of MySQL, please detour, I have been affected by the version of the problem

Install MySQL directly with the Apt-get install Mysql-server, and then use a garbled appearance, found Mysql-server code is Latin, through status View

Then go online to find the code changes, is a lot of, tried a lot of not, bored to death. The most is to change the/etc/my.cnf file, but I do not have this file on the server, looked under, my profile is this/etc/mysql/my.cnf, and then according to others said to modify this file,
1 [Client] added: Default-character-set=utf8
2[MYSQLD] Add: default-character-set= UTF8

Then restart the database, and then it becomes:

And then continue to find, try a few other useless things are not, in my going crazy when I find the reason, found that because the MySQL5.5 and the lower version of the different, need to change the line:
[Mysqld] under Add:
Character-set-server=utf8
Collation-server=utf8_general_ci

Then the restart succeeds. View status, successfully changed to UTF8. It's a real success, tears RUSH!!!!

Online there is a bunch of this statement check: show variables like ' character% ';

And then a bunch of set ... =utf8, don't believe, it's all nonsense, change a bit with no, check status or not change, strongly spit groove (of course, it may be the MySQL version of the problem, maybe the lower version can do so).

------------------------------------

Originally Linux under the default is the table name is case-sensitive, with the following settings, you can let MySQL is not distinguished table name casing:
1, log in with root, modify/etc/my.cnf;
2. Add a line under the [MYSQLD] node: Lower_case_table_names=1
3, restart MySQL can;

Where the Lower_case_table_names=1 parameter defaults to 1 in Windows, 0 in Unix, so there is no problem in window, The reason for the problem (especially when MySQL does not use uppercase letters when naming a table, and the error that the query uses the capital letter but will not be able to find it), is confusing.

MYSQL modified Chinese garbled/table name is not case-sensitive

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.