MySQL配置文件所在目录及优先级


配置文件目录

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)

参考资料-mysql文档


评论:
  • * * * Snag Your Free Gift: https://avtoilm.uz/index.php?zwa5an * * * hs=09065196f2b4c612d127ba9228bae5a0* ххх* 2025-06-03 23:06:28

    t0e728

  • * * * <a href="https://avtoilm.uz/index.php?zwa5an">Win Free Cash Instantly</a> * * * hs=09065196f2b4c612d127ba9228bae5a0* ххх* 2025-06-03 23:06:29

    t0e728