\n\nDebian的服务器上安装了phpmyadmin后发现多个“debian-sys-maint”用户。而且是超级管理员。删之,然后就出现重启会报Access denied for user ‘debian-sys-maint’@’localhost’” 但是使用还没有什么问题.但备份、重启、关闭、重载、状态功能全部无法使用了。\n\n查看如下配置文件,发现我删除了用户后,这里的信息是没变的。我们要么添加一个这样的账户,要么把这里的用户删除。\n
\n
\n
~#cat /etc/mysql/debian.cnf\n# Automatically generated for Debian scripts. DO NOT TOUCH!\n[client]\nhost = localhost\nuser = debian-sys-maint\npassword = 4AiDYEIp8AJIwEe1\nsocket = /var/run/mysqld/mysqld.sock\n[mysql_upgrade]\nuser = debian-sys-maint\npassword = 4AiDYEIp8AJIwEe1\nsocket = /var/run/mysqld/mysqld.sock\nbasedir = /usr
\n
\n
\n方法一:进入MySQL,添加这么一个用户。\n
\n
\n
mysql> update mysql.user set Password = password("4AiDYEIp8AJIwEe1") where User ="debian-sys-maint";\nmysql>flush privileges;\nmysql>quit\n/etc/init.d/mysql restart
\n
\n
\n
\n
方法二,编辑次文件,修改用户和密码为我们熟悉的root:
\n
vi /etc/mysql/debian.cnf