OOPS! Forget about the original post below. It does not do what it says.
This should:
Using the NetInfo Manager set the passwd property of the mysql user account to *
Still, the account appears in Sys Prefs / Users, so I guess this is not the whole story.
----------------------------------------------------------------------------------
Original Post:
It's probably because the uid of the mysql user account is above 500.
do the following as root in a terminal window:
# shutdown mysql if it's running (the -p assuming you've have secured MySQL)
> mysqladmin -u your_mysql_root_account -p shutdown
# read the netinfo entry for the mysql user
> niutil -read / /users/mysql
# here you should see the uid, if it is >=500, change it to something like 200
# before doing so, check that no other user has a uid=200 to do so:
> nigrep 200 /
or
> nireport / /users name uid
#if there is no uid set 200, then proceed with the change for mysql (otherwise use another value between 100-499)
> niutil -createprop / /users/mysql uid 200
# don't forget to reset the permissions (assuming your stuff is in /usr/local/mysql) because you just change the uid
> chown -R root.mysql /usr/local/mysql
> chown -R mysql.mysql /usr/local/mysql/var
# restart MySQL
> /usr/local/mysql/bin/safe_mysqld --user=mysql &
# Check that mysqld is happy writing in its var directory.
# Assigning a password to the mysql user account is not superfluous:
> passwd mysql
# For more information:
> apropos netinfo
> man niutil
There is also a doc about NetInfo on
www.apple.com in the MacOS X Server section if what precedes leaves you wondering. There are also some TechNotes more or less up to date but useful to read (the one about lookupd for instance). That will tell you the purpose of NetInfo (and why it overrides the regular BSD "vi /etc/group; vipw" scheme).
You can also change the uid with Applications / Utilities / NetInfo Manager but make sure to shutdown MySQL (before) and to chown (after) on its directories before restarted it.
The article in DevShed uses uid=71, that's surprising because uid<100 are reserved to the system. Anyway...
Note: The mysql user account will still appear in the Sys Pref: Users. I'm still trying to understand why.