Sign up ×
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 (and some other *nix environments) by default.

Now, I want to make MySQL work as case insensitive in Ubuntu.

Is it possible? If yes, how can I do it?

share|improve this question

migrated from Feb 22 '14 at 9:31

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

I don't think you can. See… –  Barmar Feb 22 '14 at 6:37… –  Javier Feb 22 '14 at 6:41
even if you can, my instinct is that it's not a good idea.. –  Thufir Mar 8 at 0:36

3 Answers 3

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
Worked for me, however I had to drop the database before making this change and re-import after the change. –  DanH Aug 5 '14 at 13:56
Worked like a charm. For me, it doesn't need to drop database and re-import after that. –  StackOverflowError Jan 13 at 8:28

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

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

Your Answer


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