Solve the case sensitivity problem of MYSQL in LINUX

Source: Internet
Author: User


After MySQL is installed in rpm mode in Linux, the default value is: Database Name and table name \ table alias \ variable name are case-sensitive and case-sensitive methods: 1. use the root account to log on to/etc/my. cnf or/etc/mysql/my. add the lower_case_table_names = 1 command after [mysqld] In cnf: vi/etc/my. cnf
2. restart MySQL service operation command:/etc/init. d/mysql restart 3. If the setting is successful, the Case sensitivity of the table name is no longer distinguished. NOTE: If www.2cto.com cannot find my 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. Command: cp/usr/share/mysql/my -*. cnf/etc/my. cnf mysql has four my -*. cnf file: my-small.cnf is designed for small databases. My-medium.cnf is designed for medium-sized databases. The my-large.cnf is designed for a computer dedicated to a SQL database. My-huge.cnf is designed for databases in enterprises. Question: MySQL is case insensitive in Windows. If lower_case_table_names = 0 is added to the mysqld section of my. ini, The Case sensitivity is different during import and export.
 

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.