redhat linux机箱上MySQL配置文件的默认位置是什么?
刚发现它,它是/etc/my.cnf
您可以通过运行找到所需的信息
mysql --help
要么
mysqld --help --verbose
我试过这个:
mysql --help | grep Default -A 1
并输出:
(Defaults to on; use --skip-auto-rehash to disable.) -A, --no-auto-rehash -- (Defaults to on; use --skip-line-numbers to disable.) -L, --skip-line-numbers -- (Defaults to on; use --skip-column-names to disable.) -N, --skip-column-names -- (Defaults to on; use --skip-reconnect to disable.) -s, --silent Be more silent. Print results with a tab as separator, -- --default-auth=name Default authentication client-side plugin to use. --binary-mode By default, ASCII '\0' is disallowed and '\r\n' is -- 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
它位于 /etc/mysql/my.cnf
以给定顺序从以下文件中读取默认选项:
/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf