mysql启动时,如未指定配置文件,则会按照以下目录和文件依次查找并读取配置文件
File Name | Purpose |
---|---|
/etc/my.cnf | Global options |
/etc/mysql/my.cnf | Global options |
SYSCONFDIR/my.cnf | Global options |
$MYSQL_HOME/my.cnf | Server-specific options (server only) |
defaults-extra-file | The file specified with –defaults-extra-file, if any |
~/.my.cnf | User-specific options |
~/.mylogin.cnf | User-specific login path options (clients only) |
DATADIR/mysqld-auto.cnf | System variables persisted with SET PERSIST or SET PERSIST_ONLY (server only) |
t0e728
t0e728