| 1 |
** Setup ** |
| 2 |
|
| 3 |
SET @old_secure_auth = @@GLOBAL.secure_auth; |
| 4 |
'#--------------------FN_DYNVARS_144_01-------------------------#' |
| 5 |
SELECT @@GLOBAL.secure_auth; |
| 6 |
@@GLOBAL.secure_auth |
| 7 |
1 |
| 8 |
1 / ON Expected |
| 9 |
'#--------------------FN_DYNVARS_144_02-------------------------#' |
| 10 |
SET GLOBAL secure_auth = OFF; |
| 11 |
Warnings: |
| 12 |
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release |
| 13 |
CREATE USER 'testUser'@'localhost' IDENTIFIED BY 'newpass'; |
| 14 |
connect con_user1,localhost,testUser,newpass,; |
| 15 |
connection default; |
| 16 |
SET PASSWORD FOR 'testUser'@'localhost' = OLD_PASSWORD('newpass'); |
| 17 |
connect con_user2,localhost,testUser,newpass,,,,auth=mysql_old_password:mysql_native_password; |
| 18 |
connection default; |
| 19 |
'#--------------------FN_DYNVARS_144_03-------------------------#' |
| 20 |
SET GLOBAL secure_auth = ON; |
| 21 |
Warnings: |
| 22 |
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release |
| 23 |
SET PASSWORD FOR 'testUser'@'localhost' = PASSWORD('newpass'); |
| 24 |
connect con_user3,localhost,testUser,newpass,; |
| 25 |
connection default; |
| 26 |
SET PASSWORD FOR 'testUser'@'localhost' = OLD_PASSWORD('newpass'); |
| 27 |
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 |
| 28 |
Expected error "Server is in secure auth mode" |
| 29 |
connection default; |
| 30 |
SET PASSWORD FOR 'testUser'@'localhost' = PASSWORD('newpass'); |
| 31 |
connect con_user4,localhost,testUser,newpass,; |
| 32 |
connection default; |
| 33 |
SET GLOBAL secure_auth = @old_secure_auth; |
| 34 |
Warnings: |
| 35 |
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release |
| 36 |
disconnect con_user1; |
| 37 |
disconnect con_user2; |
| 38 |
disconnect con_user3; |
| 39 |
disconnect con_user4; |
| 40 |
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testUser'@'localhost'; |
| 41 |
DROP USER 'testUser'@'localhost'; |