HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlCritical

How to make MySQL table name case insensitive in Ubuntu?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
caseinsensitiveubuntumakemysqlnamehowtable

Problem

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?

Solution

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

Code Snippets

sudo nano /etc/mysql/my.cnf
lower_case_table_names = 1
sudo /etc/init.d/mysql restart
mysqladmin -u root -p variables

Context

StackExchange Database Administrators Q#59407, answer score: 61

Revisions (0)

No revisions yet.