36

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

Facundo Casco
  • 10,065
  • 8
  • 42
  • 63
Awan
  • 18,096
  • 36
  • 89
  • 131

7 Answers7

23

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.

Alvaro Rodriguez Scelza
  • 3,643
  • 2
  • 32
  • 47
  • 2
    Using `lower_case_table_names = 0` crashed it for me too (MySQL 5.7, Windows 10). I was unable to start the service again after changing it. Using `lower_case_table_names = 2` worked – Novastorm Oct 05 '17 at 12:24
  • The case was the same for me WAMP64, Windows 10, `lower_case_table_names = 0` crashed MySQL 5.7.19 `lower_case_table_names = 2` worked. – Gordon Smith Aug 18 '18 at 00:51
  • In MySql 8.0. only 1 value works. Service crashes immediately if I use 0 or 2. I'm used standard installer for mysql – IsmailS Jun 07 '23 at 04:54
22

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

NebuSoft
  • 3,962
  • 2
  • 22
  • 24
7

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

Ahmed Bermawy
  • 2,290
  • 4
  • 35
  • 42
4

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

lower_case_table_names value = 0
czLukasss
  • 730
  • 8
  • 16
3

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

lower_case_table_names = 2

suresh
  • 41
  • 5
3
  • 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)
2

It was not phpMyAdmin. MySQL did this.

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

Osh Mansor
  • 1,232
  • 2
  • 20
  • 42
Andrey Frolov
  • 1,534
  • 10
  • 19