Query for which my.ini in use Is it possible to query mysql server to know which configuration file is in use? Sometimes, my.cnf, my.ini.

SHOW VARIABLES; -- does not have enough information here for my.ini path
It is not possible to do that, because once the config is loaded on startup, it is no longer used.

MySQL uses a deterministic algorithm for searching for a config file. You can see it on the MySQL Manual (the first table is for Windows).

Two things you can do is: check which options are loaded by default: use --print-defaults:

mysqld --print-defaults
mysqld would have been started with the following arguments:
--log_bin


(in this case, I have log_bin in my configuration file).

Force manually a configuration file to be loaded with the parameter --defaults-file:

mysqld --defaults-file=C:\my\path\to\my.ini