zondag 7 december 2008

mysql with launchd

Just tried to install mysql on ox leopard. Instead of the documented 'MySQL Startup Item' I've chosen to go the mac road: launchd, as I understand mac's equivalent of windows services. It's something unique to mac and apparantly very flexible, check it out.

Mysql installs fine from the pkg distribution, however it gets installed under root:wheel.
bringing the file: com.mysql.mysqld.plist in /Library/LaunchDaemons/com.mysql.mysqld.plist will make it automatically pick it up during startup, you may manually control it by sudo launchctl (un)load com.mysql.mysqld.plist.

starting mysql under the user mysql. However logging to mysql to change the password: mysqladmin -u root password 'secret' fails with the message:

error: 'Access denied for user 'root'@'localhost' (using password: NO)'

I've not been able to solve the problem, the documentation failes on this point. I could not manually start mysqld because, it was installed under root:wheel. So the only way to get it right: reinstall it, chmod -R jeroen:admin /usr/local/mysql*.
Than do the mysqladmin -u root password 'secret'. After that update the com.mysql.mysqld.plist file to jeroen/admin for group/userid.
Hopefully this works

Geen opmerkingen: