MySQL Forums
Forum List  »  Newbie

Re: can not change password for root-user
Posted by: lists
Date: March 28, 2005 01:35AM

Ok, so I did the following;



1. Stop mysqld and restart it with the --skip-grant-tables option as described earlier.


2. Connect to the mysqld server with this command: shell> mysql -u root


3. Issue the following statements in the mysql client: mysql> UPDATE mysql.user SET Password=PASSWORD('newpwd')
-> WHERE User='root';
mysql> FLUSH PRIVILEGES;

Replace ``newpwd'' with the actual root password that you want to use.



4. You should be able to connect using the new password.


I got the following result;

mysql> UPDATE mysql.user SET Password=PASSWORD('my_password') WHERE User='root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 5 Changed: 0 Warnings: 0

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)


The thing is that this doesn't work, and I suspect that somehow, webmin and my browser happened to remove some privileges of thr root user while changing password through mentioned webmin.


I can't login to mysql neither via the shell as root using "mysql -u root -p" (without the -p it works, but then I don't seem to be able to do anything), neither can I login via webmin's interface using "root" as my password and my assigned password.


My follow-up question is; where are these settings stored, and how can I change back so that root has full access-rights again???



Thank you!!!!

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.