Comment 4 for bug 1610574

Revision history for this message
Lars Tangvald (lars-tangvald) wrote : Re: mysql_secure_installation locks out root database user

If you don't specify the user it'll just use the username you run the command as (so root, with sudo).

As noted you should be able to work around the bug with ALTER USER, i.e. running:
sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH 'mysql_native_password' BY 'passphrase';"
on the command line