【开发笔记】-MySQL数据库忽略表名大小写

1. 查看数据库大小写配置

show variables like '%lower%';

 

 2. 使用root权限登录,修改配置文件 /etc/my.cnf

3. 在[mysqld]节点下,加入一行: 

lower_case_table_names=1

4. 重启MySQL : 

systemctl restart mysqld.service

5. 查看数据库大小写配置

show variables like '%lower%';

 

 6. 设置成功

注意:

如果发生表或数据库不能删除修改的情况,将以上配置改回即可;

posted @ 2020-01-07 10:42  多搞学习少搞事情  阅读(3748)  评论(0编辑  收藏  举报