mysql user

hyph-n

Registered
install mysql & all is working gr8 :)

however, i needed to setup a user called 'mysql' - no problem with that, except that it is now visible on the Logon screen. Is there a way to choose which users are visible on the Logon screen & which are not...?
 
not sure that you understand what i am asking....
I have mysql up & running A.OK... :)

i am running: mysql Ver 11.15 Distrib 3.23.45, for apple-darwin5.1 (powerpc)

the only problem i have is that the 'mysql' user appears on the front login screen. - I don't want i to -> i want it to be like 'root', in that it doesn't appear & you have to choose 'other' to get to it....

n e ideas n e 1?
 
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.
 
:)
the NetInfo * thing worked.... but what has this done...? - has it effectively said that the mysql user doesn't have a password? - isn't this a security risk..?
 
The password being * out, it's gonna be a challenge to log using that account.

Try to log as mysql through ssh or the Log in window (with the Name and fields entry fields option selected in SysPrefs/Login), crypt() will have a great difficulty to match '*' whatever you try as a password.

Why is the account still appearing in SysPrefs/Users, I don't know, the account "looks" like www's in NetInfo, so I guess Users has its own configuration somewhere else. When documentation is scarce...

Any good Samaritan reading this?
 
Back
Top