如何设置mysql的超级用户root的密码?

由 zhangzezhi0 在 12-05-2003 08:37 发表:

mysql问题

我装的是rh9是里面的mysql,进入mysql正常,但是当我想改超级用户密码:

mysqladmin -u root -password abc

总是提示:

mysqladmin:connect to server at 'localhost' failed

eroor:"Access denied for user:'root@localhost'(Using password:YES)"

这是什么原因?[email protected]


由 networkboy 在 12-05-2003 12:30 发表:

re:

debian:/home/networkboy# mysqladmin -u root -p password xxxxxx

Enter password:

debian:/home/networkboy# mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 3 to server version: 4.0.16-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> quit

Bye


由 hhl00 在 12-05-2003 13:34 发表:


如果你还能以root进入mysql的话,用以下语句试试:

use mysql

update user set password=password('你要设定的root的密码') where user='root'


由 冰箱 在 12-05-2003 16:37 发表:


先用mysqladmin -u root -p password xxxxxx设密码


所有人不许动,把手举起来。我是菜鸟!


由 zhangzezhi0 在 12-06-2003 19:21 发表:


不行,我试了都修改不了我的密码?为什么?


由 大熊宝宝 在 12-06-2003 19:23 发表:


你原来有没有密码 如果有的话在出来让你输入密码的时候输入 没有就按回车


请兄弟们正确发贴,把问题发到相关版块 发贴标题请简明扼要 谢谢大家配合.

新会员发贴前请学会搜索论坛 有可能你的问题已经有答案了


由 networkboy 在 12-06-2003 19:25 发表:

re:

debian:/home/networkboy# mysqladmin -u root -p password xxxxxx(你要

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus