Update mysql user password

From DevOps Notebook
Revision as of 10:06, 2 August 2022 by MilosZ (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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;