Stuck with Access Denied for user 'root'@'localhost' - Terminal, Mac
One method:
- stop your MySQL server.
start your MySQL server with the
--skip-grant-tables
option. It allows you to connect to the server without a password./path/to/mysqld --skip-grant-tables &
connect to your server using the mysql client:
mysql
change the root password (replace NewPassord by what you want):
UPDATE mysql.user SET password=PASSWORD('NewPassord') WHERE user='root';
restart yout MySQL server.
There are others ways to reset the MySQL root password: http://dev.mysql.com/doc/refman/5.6/en/resetting-permissions.html