Bug #85019 Add version specific section for client
Submitted: 16 Feb 2017 14:04 Modified: 21 Feb 2017 8:47
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.7.17 OS:Any
Assigned to: CPU Architecture:Any

[16 Feb 2017 14:04] Daniël van Eeden
Description:
From mysql --help:
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf 
The following groups are read: mysql client

From mysqld --help --verbose:
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /opt/mysql/5.7.17/etc/my.cnf ~/.my.cnf 
The following groups are read: mysqld server mysqld-5.7

I would like to set this:
[client]
ssl-mode=PREFERRED

But that breaks on older clients.. so I have to use --loose-ssl-mode, which then causes a warning on older clients instead of an error.

How to repeat:
Try make a my.cnf with a client or mysql section which works with both older (5.6.15) and newer (5.7.17/8.0.0) clients

Suggested fix:
Read options from a client-5.7 section
[16 Feb 2017 14:43] Daniël van Eeden
The problem is actually a bit worse:
5.6.25 ignores --loose-ssl-mode=PREFERRED
5.7.17 accepts --loose-ssl-mode=PREFERRED and uses it
5.6.35 rejects --loose-ssl-mode=PREFERRED bails out. (only valid option ins REQUIRED).
[16 Feb 2017 14:57] Daniël van Eeden
On 5.6.25 I use --ssl-ca=ca.pem to allow it to use SSL
[16 Feb 2017 14:59] Daniël van Eeden
Another fix could be to allow the same values for ssl-mode as 5.7 has but then ignore them (if prefixed with loose?).
[21 Feb 2017 8:47] MySQL Verification Team
Hello Daniël,

Thank you for the report and feedback.
Verifying as a feature request to support version specific section for clients.

Thanks,
Umesh