Difference between revisions of "Update mysql user password"

From DevOps Notebook
(Created page with "<pre> mysql> ALTER USER 'user-name'@'some_host_ip' IDENTIFIED BY 'NEW_USER_PASSWORD'; mysql> FLUSH PRIVILEGES; </pre> For earlier versions of mysql (mysql 5.7.6 or MariaDB 10...")
(No difference)

Revision as of 10:06, 2 August 2022

mysql> ALTER USER 'user-name'@'some_host_ip' IDENTIFIED BY 'NEW_USER_PASSWORD';
mysql> FLUSH PRIVILEGES;

For earlier versions of mysql (mysql 5.7.6 or MariaDB 10.1.20 and earlier):

mysql> SET PASSWORD FOR 'user-name'@'localhost' = PASSWORD('NEW_USER_PASSWORD');
mysql> FLUSH PRIVILEGES;