428d851913
* refactor: generic rename to mysql * refactor: g4 with mysql syntax * test: mysql syntax * refactor: remove useless keywords * refactor: remove nonReserved keywords * refactor: lint specificFunction --------- Co-authored-by: liuyi <liuyi@dtstack.com>
40 lines
1.1 KiB
SQL
40 lines
1.1 KiB
SQL
-- https://dev.mysql.com/doc/refman/8.0/en/set-password.html
|
|
|
|
/* SET PASSWORD [FOR user] auth_option
|
|
[REPLACE 'current_auth_string']
|
|
[RETAIN CURRENT PASSWORD]
|
|
|
|
auth_option: {
|
|
= 'auth_string'
|
|
| TO RANDOM
|
|
} */
|
|
|
|
|
|
SET PASSWORD FOR user = 'auth_string' REPLACE 'current_auth_string' RETAIN CURRENT PASSWORD;
|
|
SET PASSWORD FOR user = 'auth_string' REPLACE 'current_auth_string';
|
|
SET PASSWORD FOR user TO RANDOM RETAIN CURRENT PASSWORD;
|
|
SET PASSWORD FOR user TO RANDOM;
|
|
|
|
SET PASSWORD TO RANDOM REPLACE 'current_auth_string' RETAIN CURRENT PASSWORD;
|
|
SET PASSWORD TO RANDOM REPLACE 'current_auth_string';
|
|
SET PASSWORD TO RANDOM RETAIN CURRENT PASSWORD;
|
|
|
|
SET PASSWORD = 'auth_string';
|
|
SET PASSWORD TO RANDOM;
|
|
|
|
SET PASSWORD FOR 'jeffrey'@'localhost' = 'auth_string';
|
|
SET PASSWORD FOR 'bob'@'%.example.org' = 'auth_string';
|
|
|
|
|
|
|
|
|
|
/* https://dev.mysql.com/doc/refman/5.7/en/set-password.html */
|
|
|
|
/* SET PASSWORD [FOR user] = password_option */
|
|
|
|
|
|
SET PASSWORD FOR user = 'auth_string';
|
|
SET PASSWORD FOR user = PASSWORD('auth_string');
|
|
SET PASSWORD = 'auth_string';
|
|
SET PASSWORD = PASSWORD('auth_string');
|