Mysql case sensitivity question _ MySQL

Source: Internet
Author: User
Mysql case-sensitivity issues when I was working on enterprise projects, I used oracle databases and mysql for new company projects.

1 in windows, mysql is case-insensitive by default. to make mysql case-insensitive. Change Method

Find the my. ini file in the mysql installation directory and add the following at the end of the file:

Lower_case_table_names = 0

Restart the mysql service.

2 In linux, the configuration file is case-sensitive by default and can be modified.

Log on to the root account and modify/etc/my. cnf or/etc/mysql/my. cnf.

Lower_case_table_names = 1 # case insensitive

Lower_case_table_names = 0 # case sensitive

Restart mysql service

/Etc/init. d/mysql restart

Note:

If my cannot be found in/etc or/etc/mysql. for cnf, you need to find it under/usr/share/mysql *. copy one of the cnf files to/etc/and change it to my. cnf and put it under/etc.
Cp/usr/share/mysql/my-*. cnf/etc/my. cnf

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.