无法在Windows 10的MySQL 8.x中设置lower_case_table_names [英] Can't set lower_case_table_names in MySQL 8.x on Windows 10

查看:404
本文介绍了无法在Windows 10的MySQL 8.x中设置lower_case_table_names的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 10上运行的MySQL 8.0.12中,似乎不可能将lower_case_table_names设置为2,以便在Workbench中实现大小写混合的数据库名称和表名称的外观.我意识到在引擎盖下这些对象可能保持小写,这很好.但是我希望它在Workbench中看起来正确,并且我总是可以在MySQL的早期版本中实现这一点.当我尝试这样做并重新启动服务以使其生效时,该服务将崩溃并停止.在mysql日志中,我看到以下内容:

In MySQL 8.0.12 running on Windows 10, it seems impossible to set lower_case_table_names to 2, so as to achieve the appearance of mixed case DB and table names in Workbench. I realize that under the hood these objects may remain lower case, which is fine. But I want it to look right in Workbench, and I could always achieve this in previous versions of MySQL. When I attempt to do that and restart the service so it takes effect, the service crashes and stops. In the mysql logs I see this:

服务器('2')和数据的不同的lower_case_table_names设置 字典('1').

Different lower_case_table_names settings for server ('2') and data dictionary ('1').

数据字典初始化失败.

对于许多人来说,这似乎是一个普遍的问题.

This seems to be a common problem for a lot of people.

我在此处读到,解决方案是:

I read here that the solution is:

因此lower_case_table_names需要与 --initialize.

So lower_case_table_names needs to be set together with --initialize.

但是我不知道这意味着什么,或者如何在启动时设置它.我已经在所有地方搜索过Google并阅读了一些论坛文章,但是找不到关于如何解决此问题的明确说明.

But I have no idea what that means, or how to set it at startup. I have googled all over and read several forum articles but I can't find clear instructions on how to resolve this.

推荐答案

我知道了.安装MySQL Server 8.0.x时,您必须选择高级选项才能进入此屏幕:

I figured it out. When installing MySQL Server 8.0.x, you have to select Advanced Options so that you can get to this screen:

然后选择保留给定案例这不是默认值. MySQL掩盖并掩盖此设置是荒谬的,然后在安装后无法提供更改它的方式. 他们需要解决此问题!

Then you select Preserve Given Case, which is not the default. It's ludicrous that MySQL hides and buries this setting in obscurity, and then provides no possible way post-installation to change it. They need to fix this!!

请注意,如果mysql将其删除,则可能必须将lower_case_table_names=2添加到my.ini中.而且,您可能会收到错误的,毫无意义的警告,如此处所述.我确实希望mysql能够解决每个人都会遇到的重大错误.

Be aware that you might have to add lower_case_table_names=2 to my.ini, in case mysql removes it. And you may get a buggy, nonsensical warning as discussed here. I do wish mysql would fix their big obvious bugs that everyone runs in to.

这篇关于无法在Windows 10的MySQL 8.x中设置lower_case_table_names的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆