In Linux, MySQL is case-insensitive and mysql is case-insensitive.

Source: Internet
Author: User

In Linux, MySQL is case-insensitive and mysql is case-insensitive.

MySQL in Linux Database Name, table name, column name, alias case-sensitive rules:
1. The database name and table name are case sensitive.
2. The table alias is case sensitive.
3. The column name and column alias are case-insensitive in all cases.
4. Variable names are case sensitive.
Note:
A. After MySQL is installed in Linux, the default value is case-sensitive for table names, but not for column names.
B. How to change the case sensitivity rules of table names: Log On with the root account and log on to/etc/my. cnf or/etc/mysql/my. add lower_case_table_names = 1 under [mysqld] In cnf

Java code
  1. # The MySQL server
  2. [Mysqld]
  3. Port = 3306
  4. Socket =/var/lib/mysql. sock
  5. Skip-external-locking
  6. Key_buffer_size = 16 M
  7. Max_allowed_packet = 1 M
  8. Table_open_cache = 64
  9. Sort_buffer_size = 512 K
  10. Net_buffer_length = 8 K
  11. Read_buffer_size = 256 K
  12. Read_rnd_buffer_size = 512 K
  13. Myisam_sort_buffer_size = 8 M
  14. # Add here
  15. Lower_case_table_names = 1

 
Restart the MySQL service. If the configuration is successful, the table name is not case sensitive.


MySQL databases, table names, column names, and aliases in Windows are case-insensitive.
If you want to use case-sensitive data, use the mysqld section in my. ini.
Add lower_case_table_names = 0
Note: even if this setting is changed in Windows, the query is case insensitive. Only the case sensitivity is different during import and export.

Related Article

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.