Linux论坛's Archiver

《开源》旗舰电子杂志2008年11期发布,火热下载中!

shengchao.huang 发表于 2006-9-15 20:36

mysql 设完密码不能访问,不设密码才可以!请问什么原因

为什么我的mysql数据库没有设密码可以访问,但是只要一加密码就不行了,而且是root,这个不行,并不是指某一个用户,具体如下,(用户名只要不设密码,可以连得上discuz但是设了密码,他就老是提示密码出错。希望知道的朋友能直接在论坛回复,先谢谢了!)

yejr 发表于 2006-9-16 10:51

你怎么设置的密码,把详细步骤贴上来

ljk-622 发表于 2006-9-19 15:09

没有flush privilege吧
我猜的

ljk-622 发表于 2006-9-26 16:29

操作步骤如下;
use mysql
delete from user where host='root'
update user set host='%' where user='root'

fire9 发表于 2007-12-3 23:36

[quote]原帖由 [i]ljk-622[/i] 于 2006-9-26 16:29 发表 [url=http://bbs.linuxpk.com/redirect.php?goto=findpost&pid=8578&ptid=3441][img]http://bbs.linuxpk.com/images/common/back.gif[/img][/url]
操作步骤如下;
use mysql
delete from user where host='root'
update user set host='%' where user='root' [/quote]
这么操作一定要刷新权限的.flush privileges;
如果用grant去赋予权限就不用刷新了。

Flyinmorning 发表于 2007-12-4 10:16

用grant去赋予权限也是要flush privileges的
delete from user where host='root'
update user set host='%' where user='root'
这两句看这真别扭阿,楼住你看看,这两句执行怎么可能成功?
delete from user where host='root'
host怎么会等于root?
update user set host='%' where user='root'
这句会导致禁止root从本地登陆。

bitterness 发表于 2008-6-11 16:29

:lol 我也没看懂,执行能完成都有问题

Richeal 发表于 2008-6-11 16:35

[quote]原帖由 [i]ljk-622[/i] 于 2006-9-26 16:29 发表 [url=http://bbs.linuxpk.com/redirect.php?goto=findpost&pid=8578&ptid=3441][img]http://bbs.linuxpk.com/images/common/back.gif[/img][/url]
操作步骤如下;
use mysql
delete from user where host='root'
update user set host='%' where user='root' [/quote]

可能是打字打错了吧估计是:
delete from user where user='root'

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.