Bug #78604 5.7 repo scripts reads /usr/my.cnf instead of /etc/my.cnf without warnings
Submitted: 28 Sep 2015 14:23 Modified: 10 Dec 2015 13:17
Reporter: Ramana Yeruva Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.7.9 OS:Any
Assigned to: CPU Architecture:Any

[28 Sep 2015 14:23] Ramana Yeruva
Description:
logging bug as per request from Teje:

The below issue noticed unexpectedly on EL5.
in the clean environment where no old data directory exists and 5.7 server is installed with el5 repo, found that server is started without "NO_AUTO_CREATE_USER" by default which is not a default value for 5.7 from wl#8326.And later found that 5.7 server is reading /usr/my.cnf file instead of /etc/my.cnf which is incorrect and no warning is returned during installation

How to repeat:
install 5.6 and uninstall 5.6 from repo and observe /usr/my.cnf exists
now remove /var/lib/mysql and install 5.7 freshly and start server and observe the above variables

[lroot@viking77 5.7.9]# cat /usr/my.cnf|grep sql_mode
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

mysql> select @@version;
+-----------+
| @@version |
+-----------+
| 5.7.9     |
+-----------+
1 row in set (0.00 sec)

mysql> grant all on *.* to ram@localhost;<--error should have returned by default installation by 5.7
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show variables like '%mode%';
+--------------------------+--------------------------------------------+
| Variable_name            | Value                                      |
+--------------------------+--------------------------------------------+
| block_encryption_mode    | aes-128-ecb                                |
| gtid_mode                | OFF                                        |
| innodb_autoinc_lock_mode | 1                                          |
| innodb_strict_mode       | ON                                         |
| offline_mode             | OFF                                        |
| pseudo_slave_mode        | OFF                                        |
| rbr_exec_mode            | STRICT                                     |
| slave_exec_mode          | STRICT                                     |
| sql_mode                 | STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION |<--this variable read from /usr/my.cnf which is incorrect and this is not default for 5.7
+--------------------------+--------------------------------------------+
9 rows in set (0.01 sec)
[10 Dec 2015 13:17] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly.

http://dev.mysql.com/doc/refman/5.7/en/updating-direct-rpms.html now says:

Note
Installation of previous versions of MySQL using the older packages might
have created a configuration file named /usr/my.cnf. It is highly recommended
that you examine the contents of the file and migrate the desired settings
inside to the file /etc/my.cnf file, then remove /usr/my.cnf.