简体   繁体   English

在Windows mysql的哪里更改“ lower_case_table_names = 2”的值?

[英]Where to change the value of `lower_case_table_names=2` on windows mysql?

我正在使用Windows10。我试图创建一个表,该表的名称中的首字母大写,例如: User ,但找不到包含lower_case_table_names变量的文件。

I know this is 2 years late but I hope to help others with similar problem. 我知道这已经晚了2年,但我希望能帮助其他有类似问题的人。 For those that does not use xampp, the MySQL configuration file should be located at C:\\ProgramData\\MySQL\\MySQL Server 5.7 . 对于不使用xampp的用户,MySQL配置文件应位于C:\\ ProgramData \\ MySQL \\ MySQL Server 5.7

Alternatively, you can use MySQL Workbench software to change lower_case_table_names variable. 另外,您可以使用MySQL Workbench软件来更改lower_case_table_names变量。

  1. Run MySQL Workbench software with administration right (Meaning: right click the software icon and "Run as administrator"). 以管理权限运行MySQL Workbench软件(含义:右键单击软件图标,然后单击“以管理员身份运行”)。
  2. Connect to your database. 连接到您的数据库。
  3. Find Options File under the left panel (Navigator > Instance > Options File) 在左侧面板下找到选项文件 (导航器>实例>选项文件)
  4. In General tab, tick lower_case_table_names to modify the value to 2. 常规选项卡中,勾选lower_case_table_names将值修改为2。
  5. Click Apply to save the changes. 单击“ 应用”保存更改。

Credits to Technology Explained 学分归功于技术

FYI, remember to restart the MySQL server to reflect the changes! 仅供参考,请记住重新启动MySQL服务器以反映更改!

Do these steps: 执行以下步骤:

  1. open your MySQL configuration file: [drive]\\xampp\\mysql\\bin\\my.ini 打开您的MySQL配置文件:[驱动器] \\ xampp \\ mysql \\ bin \\ my.ini
  2. look up for: # The MySQL server [mysqld] 查找:#MySQL服务器[mysqld]
  3. add this right below it: lower_case_table_names = 2 在其下面添加此名称:lower_case_table_names = 2
  4. save the file and restart MySQL service 保存文件并重启MySQL服务

From: http://webdev.issimplified.com/2010/03/02/mysql-on-windows-force-table-names-to-lowercase/ 来自: http : //webdev.issimplified.com/2010/03/02/mysql-on-windows-force-table-names-to-lowercase/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM