密碼會隨重新安裝而更動
所以
sudo nano /etc/mysql/debian.cnf
如
# Automatically generated for Debian scripts. DO NOT TOUCH! [client] host = localhost user = debian-sys-maint password = [debian-sys-maint password] socket = /var/run/mysqld/mysqld.sock [mysql_upgrade] host = localhost user = debian-sys-maint password = [debian-sys-maint password] socket = /var/run/mysqld/mysqld.sock basedir = /usr