MySQL table names are case-insensitive on Linux

Source: Internet
Author: User

A php program is downloaded and runs normally on Windows. However, when running on Linux, the system prompts that the table does not exist.

It turns out that MySQL is not case sensitive in Windows, so it is normal. However, in Linux, because MySQL is case-sensitive by default, an error occurs in the program.

The simplest way is to modify the MySQL configuration file on Linux, Which is case-insensitive.

The modification method is as follows:

Vi/etc/my. cnf
Add a line under [mysqld:

Lower_case_table_names = 1
This statement indicates a case-insensitive table name.

Restart the MySQL service and try again.

This is the easiest way to modify it. However, this method may not be very scientific. We recommend that you write a program in detail and make sure it is case sensitive.

Yes! The rule is king.

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.