博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[Ubuntu] Access denied for user ‘debian-sys-maint’@'localhost’ (using password: YES)
阅读量:6977 次
发布时间:2019-06-27

本文共 1107 字,大约阅读时间需要 3 分钟。

I have reinstalled my system to Ubuntu 12.04, after installed mysql, i found that there is an error when start mysql: 

Access denied 
for user ‘debian-sys-maint’@'localhost’ (using password: YES) 

 

After searching the reason via google, i at last found the reason, here is it:

That’s because debian has a mysql account 
for switching on/off and checking mysql status, and mysql password 
for that user “debian-sys-maint” should be the same stored 
in /etc/mysql/debian.cnf

 

here is the way to resolve it.

1. check the password in /etc/mysql/debian.cnf

sudo vim /etc/mysql/debian.cnf

you will see something like these:

[client]
host     = localhost
user     = debian-sys-maint
password = your-password-here
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = debian-sys-maint
password = your-password-here
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr 

 

2. login to mysql:

mysql -u root -p

 

3. grant the rights to debian-sys-maint

mysql> GRANT ALL PRIVILEGES ON *.* TO ‘debian-sys-maint’@'localhost’ IDENTIFIED BY ‘your-password-here’ WITH GRANT OPTION;

 

Query OK, 0 rows affected (0.00 sec) 

 

Done! 

 

 

转载地址:http://xpupl.baihongyu.com/

你可能感兴趣的文章
Oracle的分页查询
查看>>
Objective-C非正式协议与正式协议
查看>>
jquery mobie导致超链接不可用
查看>>
Python OpenCV学习笔记之:图像读取,显示及保存
查看>>
计算机职业目标
查看>>
2月国内搜索市场:360继续上升 百度下降0.62%
查看>>
HTML样式offset[Direction] 和 style.[direction]的区别
查看>>
使用memcache做web缓存
查看>>
我的友情链接
查看>>
我的友情链接
查看>>
华胜天成ivcs云系统初体验2
查看>>
MASQUERADE --random 端口不随机
查看>>
阿里云 Aliplayer高级功能介绍(二):缩略图
查看>>
从1.5K到18K 一个程序员的5年成长之路(二)
查看>>
从HelloWorld看Knative Serving代码实现
查看>>
制作一个简单的linux
查看>>
【ZooKeeper Notes 14】数据模型
查看>>
Expect自动化控制简单介绍
查看>>
我的友情链接
查看>>
Vmware虚拟机的复制后无法使用的问题和解决
查看>>