Access denied for user 'root'@'localhost' (using password: Yes) after password reset LINUX
I was able to solve this problem by executing this statement
sudo dpkg-reconfigure mysql-server-5.5
Which will change the root password.
You have to reset the password! steps for mac osx(tested and working) and ubuntu
Stop MySQL
$ sudo /usr/local/mysql/support-files/mysql.server stop
Start it in safe mode:
$ sudo mysqld_safe --skip-grant-tables
(above line is the whole command)
This will be an ongoing command until the process is finished so open another shell/terminal window, log in without a password:
$ mysql -u root
mysql> UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
Start MySQL
sudo /usr/local/mysql/support-files/mysql.server start
your new password is 'password'.
I had the same problem. You have to write mysql -u root -p
NOT mysql
or mysql -u root -p root_password