I believe there currently isn't a way to add additional startup parameters to mysql without having to manually update the init script (which then has to be maintained during the next emerge update). I'm not sure the best way to add this functionality, though it seems reasonable to use /etc/conf.d. Attached are two files for an example emplementation that adds the following functionality at startup: --log-slow-queries=/var/log/mysql/mysql.slow I'm pretty sure there used to be a thread on the forums regarding this but I wasn't able to find it for reference :/ I also assume logic would probably need to be added to handle the absense of /etc/conf.d/mysql, or problems within. Best regards, John M.
Created attachment 81200 [details, diff] Patch that adds the startup parameters found in /etc/conf.d/mysql This patch was generated against dev-db/mysql-4.1.14
Created attachment 81201 [details] Example /etc/conf.d/mysql file that adds support to log slow queries Tested in combination with the attached patch and seems to be working for dev-db/mysql-4.1.14
It's possible to pass startup parameters also from my.cnf generally, try to put log-slow-queryes = path/to/file in the [mysqld] section of the my.cnf. Additionally the rc scripts studied for the test version already has this functionality, you can find them at: /usr/portage/dev-db/mysql/files/mysql-slot.rc6-r3 ==> /etc/init.d/mysql /usr/portage/dev-db/mysql/files/mysql-slot.conf.d-r1 ==> /etc/conf.d/mysql replace /usr/portage/ with your $PORTDIR regards, Francesco R.
Well how about that :/ I tried so hard to make sure it wasn't already there, that's awesome though. Thanks so much! John M.