content_image/809604.jpg content_image/809597.jpg content_image/809594.jpg
## Option File Processing Order 

•Option File Syntax 

•Option File Inclusions 

MySQL looks for option files in the order described in the following discussion and reads any that exist. If an option file you want to use does not exist, create it using the appropriate method, as just discussed. 

<img src='content_image/809604.jpg'>

## Note 

For information about option files used with NDB Cluster programs, see Section 23.3, “Configuration of NDB Cluster” . 

On Windows, MySQL programs read startup options from the files shown in the following table, in the specified order (files listed first are read first, files read later take precedence). 

<img src='content_image/809597.jpg'>

In the preceding table, %WINDIR%  represents the location of your Windows directory. This is commonly C:\WINDOWS . Use the following command to determine its exact location from the value of the WINDIR environment variable: 

C:\> echo %WINDIR% 

%APPDATA%  represents the value of the Windows application data directory. Use the following command to determine its exact location from the value of the APPDATA  environment variable: 

C:\> echo %APPDATA% 

BASEDIR  represents the MySQL base installation directory. When MySQL 8.0 has been installed using MySQL Installer, this is typically C:\ PROGRAMDIR \MySQL\MySQL 8.0 Server  where PROGRAMDIR represents the programs directory (usually Program Files  on English-language versions of Windows), See Section 2.3.3, “MySQL Installer for Windows” . 

DATADIR  represents the MySQL data directory. As used to find mysqld-auto.cnf , its default value is the data directory location built in when MySQL was compiled, but can be changed by --datadir specified as an option-file or command-line option processed before mysqld-auto.cnf  is processed. 

On Unix and Unix-like systems, MySQL programs read startup options from the files shown in the following table, in the specified order (files listed first are read first, files read later take precedence). 

<img src='content_image/809594.jpg'>

## Note 

On Unix platforms, MySQL ignores configuration files that are world-writable. This is intentional as a security measure. 

