I have already seen http://dev.mysql.com/doc/refman/4.1/en/mysql-config-wizard-file-location.html
how to know mysql my.cnf location
and
http://dev.
on Windows if MySQL is install as a service you can change the binpath of the service. For example
sc config MySQL57 binPath= "\"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe\" --defaults-file=\"" MySQL57"
space after binpath is important. You must escape double quotes