忘记mysqladm密码 怎么重设Mysql密码?

由 麥頭 在 05-05-2003 23:42 发表:

忘记mysqladm密码 怎么重设Mysql密码?

第一次用mysql,不懂

刚开始用mysqladmin设了密码,后来不知是设错还是什么原因,不能重新用mysql了,

命令

提示:

root@localhost root]# mysql -p

Enter password:

ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

[root@localhost root]# mysqladmin password 65107504

mysqladmin: connect to server at 'localhost' failed

error: 'Access denied for user: 'root@localhost' (Using password: NO)'

redhat8自带mysql

删除mysql后,重新安装还是一样,

不知怎么搞。


可以知多点,就识多的,


由 werix 在 05-06-2003 01:41 发表:


Lost MySQL root password

Usually the procedure is (as sysadmin root)

mysqladmin -u root password

but if your mysql root password is blank, you might try

mysql -u root mysql

UPDATE user SET PASSWORD = PASSWORD()

WHERE user='root';

FLUSH PRIVELEGES;


由 麥頭 在 05-06-2003 09:27 发表:


不知怎么搞,还不会设密码

用root登陆的

可以用-u user登上mysql不过mysql -u root 出错

[root@localhost root]# mysqladmin -u root 65107504

mysqladmin: connect to server at 'localhost' failed

error: 'Access denied for user: 'root@localhost' (Using password: NO)'

[root@localhost root]# mysql -u root mysql

ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

[root@localhost root]# mysql -u root

ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

[root@localhost root]# mysql -u zww

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

Your MySQL connection id is 47 to server version: 3.23.52

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

mysql>

不过我打算删掉mysql和php,不用rpm安装改用tar,


可以知多点,就识多的,


由 pupilzeng 在 05-06-2003 15:35 发表:


> quote: > > * * * > > 最初由 麥頭 发表
>
> **不知怎么搞,还不会设密码
>
> 用root登陆的
>
> 可以用-u user登上mysql不过mysql -u root 出错
>
>
>
> [root@localhost root]# mysqladmin -u root 65107504
>
> mysqladmin: connect to server at 'localhost' failed
>
> error: 'Access denied for user: 'root@localhost' (Using password: NO)'
>
> [root@localhost root]# mysql -u root mysql
>
> ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
>
> [root@localhost root]# mysql -u root
>
> ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
>
> [root@localhost root]# mysql -u zww
>
> Welcome to the MySQL monitor. Commands end with ; or \g.
>
> Your MySQL connection id is 47 to server version: 3.23.52
>
>
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
>
>
> mysql>
>
>
>
> 不过我打算删掉mysql和php,不用rpm安装改用tar, ** > > * * *

好像是你的命令格式不对吧

应该是mysql -u root -p passwd

输入密码是要加-p参数


_由 Debentoo Gao 在 05-06-2003 17:05 发表: </i _

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