So…, I have about 30 instance of Mysql. I am looking some kind of parser which help me made cleanup witch this file. Because In all of this file everything look diffrent and its difficulte to administer.
I don’t know of any tool that can work as a parser to cleanup my.cnf files… but maybe pt-mysql-summary can help you. At the end of the report it shows the my.cnf but without comments or blank lines. This is the original my.cnf:
With this tool you can get diffs on MySQL configuration comparing different servers. This tool can connect to remote hosts and get the differences in variable configurations. There are some examples of how to use this tool:
As a side note, with that large of a MySQL deployment, I would look into some sort of configuration management software like Puppet or Chef. Once that is setup, you can easily manage MySQL users, my.cnf settings, backup scripts, etc., all from one central location. For the my.cnf specifically, you can setup variables by hostname (i.e. InnoDB buffer pool size), and then have it build out the my.cnf from a template using those variables.
We currently use Puppet, but are looking to migrate to Chef here in the near future.