MySQL Case sensitive issues

Source: Internet
Author: User

Problem:

When the MySQL table was created, it was found that the unification was turned into lowercase after completion, whether it was uppercase or lowercase.

Reason:

MySQL is case-insensitive under Windows, and table names are automatically converted to lowercase when the script file is imported into MySQL.

Workaround: (Based on the method under Windows system)

Locate the My.ini file in the MySQL installation directory, add the last file (1 for case insensitive, 2 for case sensitivity)

1 lower_case_table_names=2

Then restart the mysql,cmd command line input:

1 net stop MySQL 2 net start MySQL

Then, in the MySQL command interface, enter:

Show variables like '%low% ';

  

Found to be case sensitive, to this setting succeeded.

In addition, when using Navcat to execute SQL scripts, you may also encounter a problem: Obviously the script statement is executed in uppercase table names, but after the completion, found that some table names have been changed to lowercase format

For example: (a strange lowercase table name suddenly appears in all uppercase tables for unknown reasons)

  

Solution,

1. Hand-use command changes.

1 Table  to t_m; 2 Table  to t_meeting;

2. Locate the data file and rename it directly:

File path: C:\ProgramData\MySQL\MySQL Server 5.5\data

It is good to find the corresponding database and rename the corresponding table, because Navcat renaming seems to have no effect, it may be my version problem, so it is not recommended to directly modify with Navcat.

============

MySQL Case sensitive issues

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.