MySQL database is case-sensitive by default

Source: Internet
Author: User

MySQL database in Linux system is case-sensitive by default

Today in development encountered such a problem, the connection to the database to the server (the server is a Linux system), the program has been running out of error, the total hint of the database table is not found,

and open the database to see the table clearly exists, in my impression MySQL data is not case-sensitive, and later found that the data in the Linux system is strictly the default MySQL size

Can be added to the configuration file,

After logging in with the root account, add Lower_case_table_names=1 and restart the MySQL service after [mysqld] in/etc/my.cnf, then the success is set: The case of the table name is not distinguished;
Where 0: Case-sensitive, 1: Not case-sensitive MySQL under Linux database name, table name, column name, alias casing rules are as follows: 1, database name and table name is strictly case-sensitive, 2, table alias is strictly case-sensitive, 3, column name and column alias is ignored in all cases 4, the variable name is also strictly case-sensitive;


This article is from the "Blue Leaf Water" blog, please be sure to keep this source http://dellinger.blog.51cto.com/12445009/1982882

MySQL database is case-sensitive by default

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.