Visto aquí: https://dev.to/oneearedmusic/access-denied-reset-mysql-root-user-password-2hk4
sudo /etc/init.d/mysql stop sudo mysqld_safe --skip-grant-tables --skip-networking & mysql -u root
use mysql; UPDATE user SET authentication_string=PASSWORD("securepassword") where User='root'; UPDATE user SET plugin="mysql_native_password"; FLUSH PRIVILEGES; quit;
sudo reboot