Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am using Ubuntu 13.10 and Mysql 5.6 and I know Database Name and Table Name are case sensitive in Ubuntu(some *nix) environment. Now i want mysql should work for as case insensitive. Is it possible. if Yes how can i do it

share|improve this question

migrated from stackoverflow.com Feb 22 at 9:31

This question came from our site for professional and enthusiast programmers.

1  
I don't think you can. See dev.mysql.com/doc/refman/5.0/en/… –  Barmar Feb 22 at 6:37
    
stackoverflow.com/questions/11165944/… –  Javier Feb 22 at 6:41
add comment

3 Answers 3

database and table names are not case sensitive on some platforms, you should not refer to a given database or table using different cases within the same statement.... it doesnt matter you write in which case..the following statement would not work because it refers to a table both as my_table and as MY_TABLE: mysql> SELECT * FROM my_table WHERE MY_TABLE.col=1;

share|improve this answer
add comment

Unless you can mount your database directory on a case-insensitive filesystem, I don't think you can do it. MySQL table names map directly to file names; if the filesystem is case-sensitive, the table names are. See

9.2.2 Identifier Case Sensitivity

share|improve this answer
add comment

Open terminal and edit /etc/mysql/my.cnf

sudo nano /etc/mysql/my.cnf

Underneath the [mysqld] section.add:

lower_case_table_names = 1

Restart mysql

sudo /etc/init.d/mysql restart

Then check it here:

mysqladmin -u root -p variables
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.