notes

Personal reference collection of useful tools, code snippets, and dev notes.

View on GitHub

Connect as root user.

sudo mysql -u root

Reset root user password (legacy).

USE mysql;
UPDATE user SET authentication_string=PASSWORD("rootpass") WHERE User='root';
FLUSH PRIVILEGES;

Verify user table and force mysql_native_password plugin (legacy).

SELECT Host,User,authentication_string,plugin FROM mysql.user;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
FLUSH PRIVILEGES;