![Access Access](/uploads/1/2/5/5/125500843/512393446.jpg)
Working Solution - Mac OS X. Jamie Stephens. July 09, 2010 12:23AM Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO). Access denied for user (using password: yes) Tanmay Ahmed. July 24, 2009 04:07AM Re: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) and Best and one.
The same as Ulrich Metzger, after updgrading my machine to Ubuntu 16.04 and Mysql-server-5.7, I couldn't log in with root because of plugin column changed in mysql database. Both sudo dpkg-reconfigure mysql-server-5.7 command and removing, purging and cleaning did not solve my problem. I had to stop mysql service # sudo service mysql stop Start mysql daemon with no -no-grant-tables option # sudo mysqlsafe -no-grant-tables & Then in another terminal, enter mysql (which do not have anymore authenfication) with command mysql, and update password and plugin columns via a sql UPDATE UPDATE mysql.user SET authenticationstring=PASSWORD('), plugin='mysqlnativepassword' WHERE User='root' AND Host='localhost'; Finally kill mysqlsafe command, restart mysql service and connect to mysql normaly # sudo service mysql start # mysql.
I'm pulling my hair out trying to decipher why every time I do a fresh install of mysql on OSX and import a database, the minute I restart the mysql instance I'm prompted with the message: Access denied for user 'root'@'localhost' (using password: YES). I've kept the password to defaulted root, and this is quit frustrating.
I've tried my hardest to ensure no other instances of mysql are running. The Activity monitor reports no other instances of mysql, and when searching for pids no other instances appear.
Does anyone know what is happening? This error could occur in the following cases:. Using an incorrect password. Since you mentioned that you have defaulted the password to root, check if you have the CAPS lock on. It could occur if you have an incorrect password specified in an option file. Try logging in using: mysqladmin -no-defaults -u root -p pass.
You might have to grant access to root. Stop MySQL: /etc/init.d/mysql stop.
Start MYSQL skippping grants: /usr/sbin/mysqld -skip-grant-tables -skip-networking &. Login: mysql -u root. Flush privileges: FLUSH PRIVILEGES;. Update Password: SET PASSWORD FOR root@'localhost' = PASSWORD('password'); UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root'.