How to set a custom location of the primary MySQL configuration file (`my.cnf` / `my.ini`)?

Specify it via the MYSQL_HOME environment variable:

2024-02-09--16-37-40

Checking the result

mysql --help

2024-02-09--16-38-41