How to change mysql password I am on OS X 10.9.5 and I did a reinstall of mysql2 and I provided a password during installation but it is not working when I run the command mysql -uroot -p. The result I get is: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Does someone know how I can reset the mysql password? I have been searching posts all day on how to fix my issues but nothing has helped.
Here are the exact steps I had to run to get it working:

sudo /usr/local/mysql/support-files/mysql.server stop

sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables


In new terminal:

mysql -u root  

UPDATE mysql.user SET Password=PASSWORD('my-new-password') WHERE User='root';  
FLUSH PRIVILEGES;  

\q

sudo /usr/local/mysql/support-files/mysql.server start