How do I know which configuration file is used by MySQL currently? Is there any command or something to find it out?
you can find it by running the following command
mysql --help
it will give you the mysql installed directory and all commands for mysql.