Isaac Sloan - Web Developer, Photographer, Musician and Citizen of Earth
Banner700

Logging into mysql -u root with non root user on Mysql 5.7

November 30, 2017

When you upgrade from Mysql 5.6 to 5.7 you will no longer be able to log into mysql's root user without root access.

This is annoying if you're using it for development as most frameworks assume the development database can be connected to via root user with no password.

This solution is to change the login plugin back to native_password.

  1. Use sudo to login:

    sudo mysql -u root

  2. Change login plugin:

Logging into mysql -u root with non root user on Mysql 5.7