Follow dba-ninja.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

dba-ninja.com Links

Dba_db2_button

Sqlserver_dba_button

How to make MySQL tables case insensitive

21 April,2020 by Rambler

Question: I'm working with vendor supplied  ddl scripts, which  are causing case-sensitive issues. Early in the scripts - there is a CREATE TABLE statement . But further down the script there is an INSERT statement - but the case of the table is lower - causing an error . How can I fix this issue?

Answer:To fix this issue - change the "lower_case_table_names"  variable . To see  the current value of lower_case_table_names use :

show variables like '%lower_case_table_names%'

 

To solve this problem - you will need to change the value to "1" .

Find the location of the "my.cnf" file and add the variable lower_case_table_names 

lower_case_table_names = 1

Stop and Start mysql 

mysql > systemctl stop mysql

mysql > systemctl stop mysql

 

Login to mysql and execute show variables like '%lower_case_table_names%'  to see value . 


Author: Rambler (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to make MySQL tables case insensitive


dba-ninja.com