Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why my tables' names are converted into lowercase in phpmyadmin?

I am using wamp server 2.0 on Windows XP. Whenever I create a table with some uppercases in name, it is converted to lowercase.

For example:

I create: UserInfo
phpmyadmin convert it to: userinfo

I am using ubuntu/phpmyadmin in office but this problem does exists there.

from where can I fix this. Thanks

like image 256
Awan Avatar asked Apr 17 '10 19:04

Awan


People also ask

How do I change a table value in phpMyAdmin?

Click on the table you wish to modify. Inside the table, you will see a list of columns. To the right of the column name, you will see a link called "Change" under the Actions. Click on the Change link for the column you wish to modify.

How do I make MySQL case sensitive in Windows?

For windows, it's available in the C:\ProgramData\MySQL\MySQL Server X.X directory. Open this file in administrator mode and set the lower_case_table_names variable value to 2.

How do I make MySQL not case sensitive?

In order to prevent this problem you need to set the mysql variable lower_case_table_names=1 in /etc/mysql/my. cnf file. In this way the mysql server will store the table in the file system using lower case.

Are table names in MySQL case sensitive?

Table names are stored in lowercase on disk and name comparisons are not case-sensitive. MySQL converts all table names to lowercase on storage and lookup.


7 Answers

There is a directive for forcing table names to lower case.

You want to set the lower_case_table_names value to 0.

You can read more about it from MySQL documentation here

like image 87
NebuSoft Avatar answered Sep 30 '22 12:09

NebuSoft


I've tried what's been suggested here, i must inform that

lower_case_table_names = 0

doesn't work in xampp, it crashes MySQL service at the moment you restart it. Yet

lower_case_table_names = 2

didn't crash, and apparently worked... at least it allowed me to insert a db with camel case.

like image 25
Alvaro Rodriguez Scelza Avatar answered Oct 01 '22 12:10

Alvaro Rodriguez Scelza


In windows the default value for lower_case_table_names = 1.

You need to change or add this value to my.ini file in your mysql folder..

If this line is not found, then add it under [mysqld]

lower_case_table_names = 0

And then restart the wamp services, it will work :D

like image 32
Ahmed Bermawy Avatar answered Sep 30 '22 12:09

Ahmed Bermawy


You must find file my.ini in your mysql folder and change, or add this line:

lower_case_table_names value = 0
like image 40
czLukasss Avatar answered Oct 02 '22 12:10

czLukasss


You need to find file my.ini in your mysql folder and change, or add this line at bottom:

lower_case_table_names = 2

like image 33
suresh Avatar answered Sep 30 '22 12:09

suresh


It was not phpMyAdmin. MySQL did this.

p.s. It is a bad practice to use camelCase in databases. Use _underlines instead. :)

like image 44
Andrey Frolov Avatar answered Oct 03 '22 12:10

Andrey Frolov


  • Step 1: open your MySQL configuration file: [drive]\xampp\mysql\bin\my.ini or open xampp click on mysql -> config then open my.ini file
  • Step 2: Search [mysqld] for: # The MySQL server [mysqld] in my.ini file
  • Step 3: Add this :lower_case_table_names=2
  • Step 4: save the file and restart MySQL service or (Xampp)
like image 40
Amaresh Kumar Avatar answered Sep 30 '22 12:09

Amaresh Kumar