-1

I'm using MySQL.

I run an update statement against the table user to change password of the root user. Here is how the first row looks when I query select * from user:

| localhost          | root             | sam            

My first question is why password isn't encrypted.

Secondly, when I'm trying to login

mysql -u root -p 

using the same password it responds

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

1

Don't play around with system tables.
If you want to change the password use SET PASSWORD

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.