Note that from MySQL 5.7.6, the user table uses the authentication_string column only to store the password. UPDATE user SET password = PASSWORD( 'dolphin')įLUSH PRIVILEGES Code language: SQL (Structured Query Language) ( sql ) Suppose you want to change the password for the dbadmin user that connects from the localhost to dolphin, you need to execute the following statements: USE mysql The first way to change the password is to use the UPDATE statement to update the user table of the mysql database.Īfter executing the UPDATE statement, you also need to execute the FLUSH PRIVILEGES statement to reload privileges from the grant table in the mysql database. Change MySQL user password using UPDATE statement MySQL provides various statements that you can use to change the password of a user including the UPDATE, SET PASSWORD, and GRANT USAGE statements. You can start changing the user account’s password.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |