通过 webmin 锁定 mysql 数据库!
[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 锁定了!这就是我跑的一切!
[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
I got lockout after trying yo enable remote ip, my shell is still open and i can access it from putty but i am lock out from webmin! This is everything i ran!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您需要恢复的是 MySQL root 密码,请尝试以下操作:
http:// /www.cyberciti.biz/tips/recover-mysql-root-password.html
对于 webmin 密码,请尝试以下操作:
这里的第二点:http://www.webmin.com/faq.html
If what you need to recover is the MySQL root password try this:
http://www.cyberciti.biz/tips/recover-mysql-root-password.html
For the webmin password try this:
Second point here: http://www.webmin.com/faq.html