Bug #83778 mysql_secure_installation considers [mysql] section in my.cnf
Submitted: 10 Nov 2016 22:18 Modified: 11 Nov 2016 6:40
Reporter: Oli Sennhauser Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.7.16 OS:Linux (n.a.)
Assigned to: CPU Architecture:Any
Tags: my.cnf, MySQL, mysql_secure_installation, section

[10 Nov 2016 22:18] Oli Sennhauser
Description:
mysql_secure_installation considers the [mysql] section in my.cnf which is for mysql client only instead of the [client] section. This leads to errors.

Seems to be a regression in 5.7 this worked correctly in 5.6.

How to repeat:
[mysql]

no_auto_rehash
max_allowed_packet             = 16M
prompt                         = '\u@\h [\d]> '
default_character_set          = utf8

/home/mysql/product/mysql-5.7.16/bin/mysql_secure_installation --help
mysql_secure_installation: [ERROR] unknown option '--no_auto_rehash'
mysql_secure_installation: [ERROR] unknown variable 'max_allowed_packet=16M'
mysql_secure_installation: [ERROR] unknown variable 'default_character_set=utf8'
mysql_secure_installation: [ERROR] unknown variable 'prompt=\u@\h [\d]> '

Suggested fix:
Seems to be a regression in 5.7 this worked in 5.6

Consider [client] section only.
[11 Nov 2016 6:40] MySQL Verification Team
Hello Oli,

Thank you for the report.

Thanks,
Umesh