3
SET @old_secure_auth = @@GLOBAL.secure_auth;
4
'#--------------------FN_DYNVARS_144_01-------------------------#'
5
SELECT @@GLOBAL.secure_auth;
9
'#--------------------FN_DYNVARS_144_02-------------------------#'
10
SET GLOBAL secure_auth = OFF;
11
CREATE USER 'testUser'@'localhost' IDENTIFIED BY 'newpass';
12
** Connecting con_user1 using testUser **
13
** Connection default**
14
SET PASSWORD FOR 'testUser'@'localhost' = OLD_PASSWORD('newpass');
15
** Connecting con_user2 using testUser **
16
** Connection default**
17
'#--------------------FN_DYNVARS_144_03-------------------------#'
18
SET GLOBAL secure_auth = ON;
19
SET PASSWORD FOR 'testUser'@'localhost' = PASSWORD('newpass');
20
** Connecting con_user3 using testUser **
21
** Connection default **
22
SET PASSWORD FOR 'testUser'@'localhost' = OLD_PASSWORD('newpass');
23
** Connecting con_user4 using testUser **
24
ERROR HY000: Server is running in --secure-auth mode, but 'testUser'@'localhost' has a password in the old format; please change the password to the new format
25
Expected error "Server is in secure auth mode"
26
** Connection default**
27
SET PASSWORD FOR 'testUser'@'localhost' = PASSWORD('newpass');
28
** Connecting con_user4 using testUser **
29
** Connection default **
30
SET GLOBAL secure_auth = @old_secure_auth;
31
Disconnecting Connections con_user1, con_user2, con_user3, con_user4
32
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testUser'@'localhost';
33
DROP USER 'testUser'@'localhost';