Syntax#
1SET PASSWORD [FOR user] =
2 {
3 PASSWORD('some password')
4 | OLD_PASSWORD('some password')
5 | 'encrypted password'
6 }
Example#
p.s. change the following example username root
by your own.
1SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
or if you wanna delete the password from user:
1SET PASSWORD FOR 'root'@'localhost' = PASSWORD("");
References#
- 《SET PASSWORD - MariaDB Knowledge Base》https://mariadb.com/kb/en/set-password/