Bug #109294 $MYSQL_HOME/my.cnf is read from other mysql programs (not only server)
Submitted: 6 Dec 2022 10:16 Modified: 6 Dec 2022 10:35
Reporter: Tsubasa Tanaka (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0.31 OS:Any
Assigned to: CPU Architecture:Any

[6 Dec 2022 10:16] Tsubasa Tanaka
Description:
$MYSQL_HOME/my.cnf is described "server only" in https://dev.mysql.com/doc/refman/8.0/en/option-files.html

> $MYSQL_HOME/my.cnf	Server-specific options (server only)

But actually, other mysql programs read $MYSQL_HOME/my.cnf. Not "server only".

How to repeat:
$ echo -e "[mysql]\nsocket=/dummy" > /tmp/my.cnf
$ export MYSQL_HOME=/tmp  ## $MYSQL_HOME/my.cnf is /tmp/my.cnf
                          ## If clients don't read $MYSQL_HOME/my.cnf, socket is not "/dummy" .
$ mysql                   ## But actually, mysql commandline-client read /tmp/my.cnf and set --socket=dummy
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/dummy' (2)

Suggested fix:
Fix the reference manual. 
$MYSQL_HOME/my.cnf is not read only server, all mysql programs read it.

https://dev.mysql.com/doc/refman/8.0/en/option-files.html
[6 Dec 2022 10:35] MySQL Verification Team
Hello tanaka-San,

Thank you for the report and feedback.

regards,
Umesh