Friday, November 30, 2007

Resetting mysql root password on a mac

i was trying to reset the root password for mysql on my mac the other day , but apparently it was very easy to do ......... here is how to do it :
run the follwing command:

sudo mysqld_safe --skip-grant-tables --user=root

this will allow you to login to mysql using the root username without specifying a password..

shell>mysql -u root

then you can update the user privileges in your db for your root.......voila.