$ sudo cat /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = JRptVM1k9l8SvIau
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = JRptVM1k9l8SvIau
socket = /var/run/mysqld/mysqld.sock
$ mysql -u debian-sys-maint -p mysql> SELECT User, Host, plugin FROM mysql.user;
mysql> UPDATE mysql.user SET plugin = 'mysql_native_password'; mysql> FLUSH PRIVILEGES;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'P@ssw0rd'; mysql> FLUSH PRIVILEGES;