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

前端 未结 7 514
梦谈多话
梦谈多话 2020-12-25 12:03

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         


        
相关标签:
7条回答
  • 2020-12-25 12:26

    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

    0 讨论(0)
  • 2020-12-25 12:26

    It was not phpMyAdmin. MySQL did this.

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

    0 讨论(0)
  • 2020-12-25 12:33

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

    lower_case_table_names value = 0
    
    0 讨论(0)
  • 2020-12-25 12:34

    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.

    0 讨论(0)
  • 2020-12-25 12:35
    • 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)
    0 讨论(0)
  • 2020-12-25 12:36

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

    lower_case_table_names = 2

    0 讨论(0)
自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题