Question

[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!

Was it helpful?

Solution

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:

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

Second point here: http://www.webmin.com/faq.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top