Check the configuration file used on Windows:
Find from Services.msc
- Open the Services.msc windows.
- Find the mysql service running and right click on properties.
- In General tab, you find the executable path where you find the MY.INI file.

"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" MySQL80
Another way to find from command line of windows:
---It will find the my.ini file location
mysqld --help --verbose --console | findstr "my.ini"
C:\WINDOWS\my.ini
C:\WINDOWS\my.cnf
C:\my.ini
C:\my.cnf
C:\Program Files\MySQL\MySQL Server 8.0\my.ini
C:\Program Files\MySQL\MySQL Server 8.0\my.cnf
Check the configuration file On Linux
ps aux |grep mysqld
Check the configuration file on Solaris
$ /usr/ucb/ps -alxwww | grep mysqld