The password would need to be available to the MySQL Exporter application in clear text, so that it can be used to authenticate with MySQL. As a result, if it were to be encoded in some way in the configuration file it would need to be reversable. Therefore if you encrypted the password, you’d need to also pass in the decryption key in some way - so you’ve not really changed anything.
The correct thing to do is to use standard unix file permissions & user management to ensure the password is protected. Have a dedicated user for the exporter and ensure only that user can read the configuration file.