0
[root@cp ~]# mysql> CREATE DATABASE foo;
[root@cp ~]#  mysql> GRANT ALL ON foo.* TO root@'my home ip' IDENTIFIED BY 'aron1252';
[root@cp ~]# mysql> update user set Host='my home ip' where user='webadmin';
[root@cp ~]# GRANT ALL ON foo.* TO root@'localhost' IDENTIFIED BY 'newpass';
-bash: GRANT: command not found
[root@cp ~]# mysql> GRANT ALL ON foo.* TO root@'localhost' IDENTIFIED BY 'newpass';
[root@cp ~]#  mysql> update user set Host='localhost' where user='webadmin';
[root@cp ~]# UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
-bash: syntax error near unexpected token `('
[root@cp ~]# UPDATE mysql.user SET Password=newpass WHERE User='root';
-bash: UPDATE: command not found
[root@cp ~]# mysql> UPDATE mysql.user SET Password=newpass WHERE User='root';
[root@cp ~]# mysql>FLUSH PRIVILEGES;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'PRIVILEGES'
[root@cp ~]# mysql -u root p- newpass

尝试启用远程 ip 后我被锁定了,我的 shell 仍然打开,我可以从 putty 访问它,但我被 webmin 锁定了!这就是我跑的一切!

4

1 回答 1

0

如果您需要恢复的是 MySQL root 密码,请尝试以下操作:

http://www.cyberciti.biz/tips/recover-mysql-root-password.html

对于 webmin 密码,试试这个:

/usr/libexec/webmin/changepass.pl /etc/webmin admin foo

这里的第二点:http ://www.webmin.com/faq.html

于 2010-10-17T05:08:29.143 回答