error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
来源:互联网 发布:ubuntu 安装unity 编辑:程序博客网 时间:2024/05/21 06:34
今天同事问了个问题,无法关闭数据库
经过查找原来同事的mysql是用apt-get安装升级的,为了安全需要,删掉了除了root以外的所有用户,现在root用户关机时mysql不能停止,显示关闭failed,这是因为删掉了debian-sys-maint用户
这是系统自动生成的mysql用户,debian和ubuntu系统都会这样做,
debian-sys-maint的密码是安装mysql时随时生成的
停止或重启服务都靠它
如果你修改了它的密码或覆盖掉密码,就会出现错误
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
查看/etc/mysql/debian.cnf查看内容,可以看到有这个mysql连接用户:[client]
host = localhost
user = debian-sys-maint
password = G1I2JcALeXXvyC50
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
user = debian-sys-maint
password = G1I2JcALeXXvyC50
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
直接用mysql登录,为debian-sys-maint用户改密:
mysql>SET PASSWORD FOR 'debian-sys-maint'@'localhost' = PASSWORD('这里就是上面看到的密码');
mysql> flush priviledges;
这样就OK了
如果删除了改用户,那只有添加了
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘debian-sys-maint’@'localhost’ IDENTIFIED BY '这里就是上面看到的密码'' WITH GRANT OPTION;
mysql> flush priviledges;
http://hi.baidu.com/hostwmtt/blog/item/a4b7cda3b784bca7cbefd018.html mysql学习笔记
- error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
- error: 'Access denied for user 'root'@'localhost' (using password: YES)'
- Access denied for user 'user'@'localhost' (using password: YES)
- 解决ERROR 1045 (28000): Access denied for user 'localhost'@'localhost' (using password:YES)
- #1045 - Access denied for user 'root'@'localhost' (using password: YES)
- 解决: Access denied for user 'mantis'@'localhost' (using password: YES)
- Access denied for user 'root'@'localhost' (using password: YES) 问题解决
- 解决'Access denied for user 'root'@'localhost' (using password: YES)'
- access denied for user 'root'@'localhost' using password yes
- Access denied for user: '***@localhost' (Using password: YES)
- Access denied for user 'Testlink '@'localhost' (using password: YES)解决
- access denied for user 'root'@'localhost' using password yes
- 1045 access denied for user 'root'@'localhost' using password yes
- Access denied for user 'root'@'localhost' (using password: YES)解决办法
- Access denied for user: 'root@localhost' (Using password: YES)
- Access denied for user 'root'@'localhost' (using password: YES)
- Access denied for user 'root'@'localhost' (using password:YES) 解决方案
- mysql Access denied for user 'root'@'localhost' (using password: YES)
- webDAV介绍
- 4.1.6 实现equals()和hashCode()
- 把时间取整(精确到天,去掉小时分秒)
- Strassen矩阵乘法
- 双网卡内外网同时使用的方法
- error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
- 天蝎女,这个让我有些痴迷的,希望幸福
- Visual C++/MFC入门教程
- 步入IT,步入Qt
- 算法~
- 天龙八部 找怪物ID
- JVM启动参数
- Symbian的两个工程文件bld.inf 文件和mmp文件
- 肤色过滤参数与过程