my.cnfで外部ファイルをinclude

某Sさんに教えてもらいました。m(_ _)m



Beginning with MySQL 5.0.4, it is possible to use !include directives in option files to include other option files and !includedir to search specific directories for option files. For example, to include the /home/mydir/myopt.cnf file, you can use the following directive:

!include /home/me/myopt.cnf

To search the /home/mydir directory and read option files found there, you would use this directive:

!includedir /home/mydir

DBサーバがいっぱいあって、ちこっと違うmy.cnfがたくさんあるときとかいいかも。