I have MySQL running on a virtual machine on my laptop within a host only network (no access to the wider internet except when I turn on the NAT interface to update the O/S). For convenience, I have the root user with no password. I have a number of projects that are setup to access the database this way within my development environment.

I just did an apt-get upgrade, which included updating MySQL to 5.7.18 (I am running Ubuntu 16.04.2 LTS) and now all of my projects are getting access denied. I am not sure which version MySQL was at before the update.

From the console, I can mysql --user=root with no problems if I am logged in as root, but not if I am logged in as anyone else.

Can anyone help determine what the update changed and how I can configure MySQL to allow root user access with no password again?


I'm not sure if the update changed the plugin for root@localhost or if the plugin remained unchanged and MySQL's behavior changed, but I resolved this problem by changing the plugin for root@localhost to mysql_native_password with the following SQL:

UPDATE user SET plugin='mysql_native_password' WHERE user='root' AND host='localhost';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.