MySQL 我在哪里可以找到文件 my.cnf 或 my.ini 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7361437/
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
Where can I find the file my.cnf or my.ini file?
提问by cudalanda
I've read about MySQL replication and i need to change some configuration but I can't find the file my.cnf or my.ini. I don't know which MySQL version I have but I've downloaded it a long time ago, as a .zip. My box runs Windows 7 64. Where can i find this file? Should I create it? Where? Thank you.
我已经阅读了有关 MySQL 复制的内容,我需要更改一些配置,但是我找不到文件 my.cnf 或 my.ini。我不知道我有哪个 MySQL 版本,但我很久以前就下载了它,作为 .zip。我的盒子运行 Windows 7 64。我在哪里可以找到这个文件?我应该创建它吗?在哪里?谢谢你。
回答by arnep
I do not have Window present at the moment, but I think it should reside in the C:\WINDOWS\
directory.
我目前没有 Window,但我认为它应该驻留在C:\WINDOWS\
目录中。
When invoking help on GNU/Linux with mysql --help
it shows (excerpt):
在 GNU/Linux 上调用帮助mysql --help
时显示(摘录):
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf
Maybe you can get the same information on Windows, too.
也许您也可以在 Windows 上获得相同的信息。
Btw: with mysql --version
you can get your current version.
顺便说一句:mysql --version
您可以获得当前版本。