Package: mysql-server-5.6
Version: 5.6.27-2

When upgrading from MySQL 5.5 to MySQL 5.6, the configuration structure in /etc/mysql was changed to support the alternatives system. This also resulted in moving the bulkof the default configuration options into /etc/mysql/mysql.conf.d/mysqld.cnf. The /etc/mysql/mysql.cnf file (a target file of the alternatives system) was replaced with a simple stub file that includes the subdirectories holding config files.

----- /etc/mysql/mysql.cnf -----

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

----- /etc/mysql/mysql.cnf -----

The conf.d/ directory previously already existed in MySQL 5.5 as a way to apply config snippets to override the defaults under /etc/mysql/my.cnf. However, in MySQL 5.6, the order in which the directories are included makes any custom options that were defined in files located in /etc/mysql/conf.d/ get overridden by the default options under /etc/mysql/mysql.conf.d/.

In my opinion, the directories should be reversed so that the conf.d/ directory is included last so it will properly override the defaults like before. Obviously, it's easy to fix this locally in my mysql.cnf file, but this ended up as a surprise on my home machine because I override the bind-address option in a file under conf.d/ to allow remote connections.

Reply via email to