# 命令安裝 sudo apt-get update sudo apt-get install -y mysql-server mysql-client # 進入mysql命令行 mysql -udebian-sys-maint -p # 輸入/etc/mysql/debian.cnf中的password # 修改密碼 use mysql; update user set authentication_string='123456' where user='root'; FLUSH PRIVILEGES;