使用 Mysql lower_case_table_names 为 1

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8147447/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 21:42:09  来源:igfitidea点击:

Use Mysql lower_case_table_names to 1

mysqltablename

提问by Nirmal- thInk beYond

I have installed mysql v5.5.17 in linux using yum, now i want default lowercase table names so i have added

我已经使用 yum 在 linux 中安装了 mysql v5.5.17,现在我想要默认的小写表名,所以我添加了

set-variable = lower_case_table_names=1

in /etc/my.cnf

/etc/my.cnf

but if i do that then i could not start mysqld service. Mysql logs says unknown variable lower_case_table_names. I have also tried with set global lower_case_table_names=1;in command line but is says its read only variable.

但如果我这样做,我就无法启动 mysqld 服务。Mysql 日志说 unknown variable lower_case_table_names。我也试过set global lower_case_table_names=1;在命令行中使用,但说它的只读变量。

any suggestion?

有什么建议吗?

采纳答案by Nirmal- thInk beYond

In 5.5 we need to specify

在 5.5 中我们需要指定

lower_case_table_names=1

回答by Richardhe2007

my OP system is ubuntu, Mysql version is 5.5.*

我的 OP 系统是 ubuntu,Mysql 版本是5.5.*

update file /etc/mysql/my.cnf, (must add under the section [mysqld])

更新文件/etc/mysql/my.cnf,(必须在部分下添加[mysqld]

[mysqld]

lower_case_table_names=1

then restart mysql

然后重启mysql