Setting a user password in mysql (Why do I get 'Access denied')
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Question:I updated a user's password in the mysql system table mysql.user and the user gets an error message 'Access denied'. What am I doing wrong?
Answer:Did you update the password field directly as shown in the example below? That won't work. The password field has to be updated using the password() function which encrypts the string.
Don't forget to reload with mysqladmin afterwards to make the authentication take effect.