对于自制的mysql安装,my.cnf在哪里? [英] For homebrew mysql installs, where's my.cnf?

查看:69
本文介绍了对于自制的mysql安装,my.cnf在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于自制的mysql安装,my.cnf在哪里?它会安装一个吗?

For homebrew mysql installs, where's my.cnf? Does it install one?

推荐答案

默认情况下没有my.cnf.因此,MySQL从所有默认设置开始.如果要创建自己的my.cnf来覆盖所有默认值,请将其放在/etc/my.cnf中.

There is no my.cnf by default. As such, MySQL starts with all of the default settings. If you want to create your own my.cnf to override any defaults, place it at /etc/my.cnf.

此外,您可以运行mysql --help并浏览列出的conf位置.

Also, you can run mysql --help and look through it for the conf locations listed.

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时要读取的其他文件.

As you can see, there are also some options for bypassing the conf files, or specifying other files to read when you invoke mysql on the command line.

这篇关于对于自制的mysql安装,my.cnf在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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