Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm unable to update the root password for MySQL. On MAC OSX

my.cnf seems to be protected, even after using sudo open -t my.cnf it still doesn't allow saving of the config file.

The message when saving is

This document could not be autosaved because you don’t have write access privileges to the folder that it’s in.

We had it working and Xampp leaves a blank root password, but after changing it in phpmyadmin, and rebooting, we now have no privileges when returning to phpmyadmin.

XAMPP's Status page says the password is set.

We were trying to figure out how to access MySQL in terminal but couldn't work it out.

share|improve this question
Please use the edit button if you want to add something to your question. – slhck Sep 4 '11 at 16:28

The password has nothing to do with my.cnf.

MySQL has a data dictionary, where user accounts are stored. The default MySQL sysadmin account is named 'root'. There are actually two different ways to reset the root account password in windows:

  1. Making a script that gets run at startup using a command line option
  2. Setting a command line option that tells MySQL not to implement security at all, which allows you to login, change the password and then restart it

Both methods are documented in step-by-step fashion here:

share|improve this answer
Someone edited my question - I put MAC OSX in the title. Also tagged as such. – JohnnyBizzle Sep 5 '11 at 7:50
Then use method 2, which works for all versions of mysql. You start mysql with --skip-grant-tables, then follow the instructions to update the root password. – gview Sep 6 '11 at 6:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.