My.ini文件在哪里?当前在MySQL Server 8.0上看起来是空的。

huangapple go评论72阅读模式
英文:

Where is My.ini file? It currently looks to be empty on MySql Server 8.0

问题

我正在尝试更新MySQL 8.0的一些设置,但当我打开my.ini文件时,它只显示 - [mysqld],没有其他内容。我有一个Windows 2019服务器。

我已经安装了MySQL Workbench,它指向my.ini文件的位置位于C:\ProgramData\MySQL\MySQL Server 8.0,因此看起来我正在寻找正确的地方。

在Workbench中,配置文件似乎不是MySQL正在使用的配置文件。例如,错误日志指向C:驱动器,但我可以看到这些日志文件在另一个E驱动器上生成。

在某个阶段,数据文件夹设置在我的E驱动器上 - E:\Data\Data - 日志文件也在这个文件夹中。

我已经使用命令SET global general_log = 0;来打开和关闭日志文件,所以我可以确定我正在查看正确的日志文件位置。

我只是看不到在哪里或如何更改日志文件等指向的位置。有什么建议吗?

英文:

I'm trying to update some settings for MySQL 8.0 however when I go to the my.ini file all it shows is - [mysqld] and nothing else. I have a windows 2019 server.

I have MySQL workbench installed it points to the my.ini file at the location C:\ProgramData\MySQL\MySQL Server 8.0, so it appears I am looking in the right place.

Within workbench the configuration file doesn't seem to be the one in use for MySql. for example the error logs are pointing to C:drive, however I can see these being generated on another drive E.

At some stage this was set up with the data folder on my E drive - E:\Data\Data - Log files are also in this folder.

I have used the command SET global general_log = 0; to turn on and off the log files, so I can be sure im looking at the correct log file location.

I just cant see where or how to change where the log files etc are pointing to. Any ideas?

答案1

得分: 1

找到了my.ini文件。

当默认数据文件夹更改为指向另一个目录时,my.ini文件也会位于那个目录中。

在我的情况下,它位于E:\Data\Data\my.ini。

英文:

Managed to find the my.ini file.

When the default data folder is changed to point to another directory the my.ini will also be located there.

In my case it was in E:\Data\Data\my.ini

huangapple
  • 本文由 发表于 2023年3月7日 19:57:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/75661690.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定