官网参考链接:
https://dev.mysql.com/doc/refman/5.7/en/option-files.html
Windows下的读取顺序:
File Name | Purpose |
---|---|
%WINDIR%\my.ini, %WINDIR%\my.cnf | Global options |
C:\my.ini, C:\my.cnf | Global options |
BASEDIR\my.ini, BASEDIR\my.cnf | Global options |
defaults-extra-file | The file specified with --defaults-extra-file, if any |
%APPDATA%\MySQL.mylogin.cnf | Login path options (clients only) |