1** Setup ** 2 3SET @old_secure_auth = @@GLOBAL.secure_auth; 4'#--------------------FN_DYNVARS_144_01-------------------------#' 5SELECT @@GLOBAL.secure_auth; 6@@GLOBAL.secure_auth 71 81 / ON Expected 9'#--------------------FN_DYNVARS_144_02-------------------------#' 10SET GLOBAL secure_auth = OFF; 11Warnings: 12Warning 1287 'pre-4.1 password hash' is deprecated and will be removed in a future release. Please use post-4.1 password hash instead 13CREATE USER 'testUser'@'localhost' IDENTIFIED BY 'newpass'; 14** Connecting con_user1 using testUser ** 15** Connection default** 16SET PASSWORD FOR 'testUser'@'localhost' = OLD_PASSWORD('newpass'); 17ERROR HY000: Password hash should be a 41-digit hexadecimal number 18DROP USER 'testUser'@'localhost'; 19CREATE USER 'testUser'@'localhost' identified with 'mysql_old_password'; 20SET PASSWORD FOR 'testUser'@'localhost'= OLD_PASSWORD('newpass'); 21Warnings: 22Warning 1287 'OLD_PASSWORD' is deprecated and will be removed in a future release. Please use PASSWORD instead 23Warning 1287 'pre-4.1 password hash' is deprecated and will be removed in a future release. Please use post-4.1 password hash instead 24** Connecting con_user2 using testUser ** 25** Connection default** 26'#--------------------FN_DYNVARS_144_03-------------------------#' 27SET GLOBAL secure_auth = ON; 28UPDATE mysql.user SET plugin='mysql_native_password' WHERE user='testUser' AND 29host='localhost'; 30FLUSH PRIVILEGES; 31SET PASSWORD FOR 'testUser'@'localhost' = PASSWORD('newpass'); 32** Connecting con_user3 using testUser ** 33** Connection default ** 34UPDATE mysql.user SET plugin='mysql_old_password' WHERE user='testUser' AND 35host='localhost'; 36FLUSH PRIVILEGES; 37SET PASSWORD FOR 'testUser'@'localhost' = OLD_PASSWORD('newpass'); 38Warnings: 39Warning 1287 'OLD_PASSWORD' is deprecated and will be removed in a future release. Please use PASSWORD instead 40Warning 1287 'pre-4.1 password hash' is deprecated and will be removed in a future release. Please use post-4.1 password hash instead 41** Connecting con_user4 using testUser ** 42ERROR 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 43Expected error "Server is in secure auth mode" 44** Connection default** 45UPDATE mysql.user SET plugin='mysql_native_password' WHERE user='testUser' AND 46host='localhost'; 47FLUSH PRIVILEGES; 48SET PASSWORD FOR 'testUser'@'localhost' = PASSWORD('newpass'); 49** Connecting con_user4 using testUser ** 50** Connection default ** 51SET GLOBAL secure_auth = @old_secure_auth; 52Disconnecting Connections con_user1, con_user2, con_user3, con_user4 53REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testUser'@'localhost'; 54DROP USER 'testUser'@'localhost'; 55