Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 124784

Summary: Add support for additional mysql startup parameters via conf.d
Product: Gentoo Linux Reporter: John McFarlane <john.mcfarlane>
Component: New packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED WORKSFORME    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Other   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch that adds the startup parameters found in /etc/conf.d/mysql
Example /etc/conf.d/mysql file that adds support to log slow queries

Description John McFarlane 2006-03-03 05:47:41 UTC
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.
Comment 1 John McFarlane 2006-03-03 05:49:30 UTC
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
Comment 2 John McFarlane 2006-03-03 05:51:41 UTC
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
Comment 3 Francesco R. (RETIRED) gentoo-dev 2006-03-03 07:02:27 UTC
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.
Comment 4 John McFarlane 2006-03-03 07:12:28 UTC
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.