[mysqld]
option_1=val_1
!includedir /etc/mysql/conf.d/
[mysqld]
option_1=val_2
As you can see the same option, in this case option_1, is defined twice . Once in the main config file and other time in the include file. My question is what will mysql treat as the final value of the option_1?
https://dev.mysql.com/doc/refman/5.7/en/option-files.html says in part:
If multiple instances of a given option are found, the last instance takes precedence, with one exception: For mysqld, the first instance of the --user option is used as a security precaution, to prevent a user specified in an option file from being overridden on the command line.
(emphasis mine)
In your example, the option will be set to val_2
.