对于 Homebrew mysql 安装,my.cnf 在哪里?它安装一个吗?
最佳答案
默认没有my.cnf。因此,MySQL 以所有默认设置启动。如果您想创建自己的 my.cnf 来覆盖任何默认值,请将其放在/etc/my.cnf。
另外,您可以运行 mysql --help
并查看列出的 conf 位置。
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
The following groups are read: mysql client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
如您所见,还有一些选项可以绕过 conf 文件,或者在命令行调用 mysql 时指定要读取的其他文件。
关于mysql - 对于 Homebrew mysql 安装,my.cnf 在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7973927/