Access denied for user 'debian-sys-maint'@'localho

3306阅读 1评论2007-08-07 hb_li_520
分类:Mysql/postgreSQL

hbli-debianetcinit.d# .mysql restart

Stopping MySQL database server mysqld failed!

Starting MySQL database server mysqld already running.

usrbinmysqladmin connect to server at 'localhost' failed

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

错误,但可以正常使用,但每次都弹出这个东西来,很不爽阿

 

 

是在 Debian 安装 MySQL 的朋友, Debian 预设启动 MySQL 的使用者账号为 debian-sys-maint@localhost , 您可以在 /etc/init.d/mysql 前面看到以下片段:
代码:
MYADMIN="/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf"
意思是会使用 /etc/mysql/debian.cnf 里所设定的账号? MySQL, 所以您有几个选择:
1.
把里面启动的账号改成您在 mysql.user table 里有权限的账号.
2.
root password 更改后, 进入 database , mysq.user table 里新增 debian-sys-maint localhost 可允许 reload shuwdown Database 的权限.
再去把 /var/run/mysqld/mysqld.sock /var/run/mysqld/mysqld.pid 删除即可.
那用那种比较安全呢?如果把帐号和密码写到debian.cnf里的话启不是谁都可以看到密码
如果在user表里增加一个debian-sys-maint那么密码填什么?就直接写原来debian.cnf里那个加密过的密码吗(不用PASSWORD(),直接把值放到password字段)?

上一篇:什么是元数据?
下一篇:记录debian相关的东西

文章评论