Linux MySQL does not differentiate table name casing configuration

Source: Internet
Author: User

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. In the [Mysqld] node, add one line: Lower_case_table_names=1 (value is 0 time zone case)
3, restart MySQL can;

MySQL under Linux database name, table name, column name, alias casing rules are like this:
1) database name and table name are strictly case-sensitive;
2) The alias of the table is strictly case-sensitive;
3) The alias of the column name and column is ignored in all cases;
4) Variable names are also strictly case-sensitive;
5) MySQL is not case-sensitive under Windows, but the default is case-sensitive under Linux.
6) If you want to distinguish the case of a field value at query time, the field value needs to be set to the binary property, which can be set in several ways:
A) settings at creation time:
CREATE TABLE T (A VARCHAR (Ten) BINARY);
b) Modify with alter

So in different operating systems in order to make the program and the database can be normal operation, the best way is to design the table in the time of the lower case!!

Linux MySQL does not differentiate table name casing configuration

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.