How do I set root password?

nemac

Registered
Sorry if this has been asked before. I have a MacBook running OS X 10.5.6. I just installed MySQL
(version MySQL 5.1.30-ndb-6.3.20-cluster-gpl) on it and I was trying to create a new database within it. However, I am told I do not have the necessary privileges to do this. The message goes on to state to use the root user to create databases and grant the necessary privileges to the new account. When I try to connect with the root user id, I left the password blank, since I have never set the password. This did not work since either it already has a default password. I looked at a previous message regarding enabling the root login. In it they state I should go to the "Netinfo" manager in the Utilities folder. I don't know if this is on a different version of the OS since I can't find the particular app. I have experience with Linux and I know that the root user id is very sensitive and should be used very sparingly if at all. Can anyone point me in the correct direction on OS X 10.5.6?

TIA

Javier
 
Don't be sorry about posting such a question, be sorry about posting it in the HOWTO-section, where _answers_ and guides are posted and not questions.

If you're working in Terminal as an administrative user, simply do a "sudo -s" command and voilà, you're root. If you _need_ to be root as a graphical user (which I doubt):

Direct copy from [ http://www.macosxhints.com/article.php?story=20071025100950309 ]:

Open Directory Utility located in Application » Utilities. You may have to unlock Directory Utility to make changes. Once it's unlocked, go to Edit » Enable Root User, and then type in a password for your root user.

Voila, you can now use the root user, and the 'Other Users' option now shows up on the login window.

[robg adds: Insert standard root user warning here -- it's dangerous, you can easily clobber your system, etc. I haven't ever really needed root in 10.4, though when I wanted to test root in 10.5, I had to "root around" for how to do it, so I thought a reference here was worthwhile.]
 
Back
Top