1
用户'debian-sys-maint'的访问被拒绝-安装mysql吗?
我试图安装mysql,但出现错误: mysql_upgrade: Got error: 1045: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) while connecting to the MySQL server 经过一番搜索后,我发现这可能会给debian-sys-maint带来麻烦,所以我: sudo cat /etc/mysql/debian.cnf 然后在mysql中设置debian密码: mysql -u root -p <password> GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password-here'; 然后我重新启动: sudo /etc/init.d/mysql restart 并再次尝试配置: sudo dpkg --configure -a 我犯了同样的错误。