1
SHOW VARIABLES LIKE 'auth_schema%';
4
auth_schema_table `auth`.`users`
5
SELECT MYSQL_PASSWORD('test_pass');
6
MYSQL_PASSWORD('test_pass')
7
34F2496C75CF8F8D8EBE14067C9C8B1AA8E80DEF
11
user VARCHAR(255) NOT NULL,
13
UNIQUE INDEX user_idx (user)
15
INSERT INTO users VALUES ('test_user', '34F2496C75CF8F8D8EBE14067C9C8B1AA8E80DEF');
16
SELECT * FROM users ORDER BY user;
18
test_user 34F2496C75CF8F8D8EBE14067C9C8B1AA8E80DEF
19
SELECT 'connection 1 works';
24
connect(localhost,test_user,foo,test,MASTER_PORT,);
25
ERROR 28000: Access denied for user 'test_user' (using password: YES)
28
user VARCHAR(255) NOT NULL,
30
UNIQUE INDEX user_idx (user)
32
INSERT INTO users2 VALUES ('test_user2', '34F2496C75CF8F8D8EBE14067C9C8B1AA8E80DEF');
33
SELECT * FROM users2 ORDER BY user;
35
test_user2 34F2496C75CF8F8D8EBE14067C9C8B1AA8E80DEF
36
SET GLOBAL auth_schema_table='`auth`.`users2`';
37
SHOW VARIABLES LIKE 'auth_schema%';
39
auth_schema_enabled ON
40
auth_schema_table `auth`.`users2`
41
SELECT 'connection 2 works';
46
SET GLOBAL auth_schema_table='auth.users';
47
INSERT INTO auth.users VALUES ('test_user3', MYSQL_PASSWORD('mypass'));
48
SELECT * FROM auth.users WHERE user='test_user3';
50
test_user3 6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4
53
SET GLOBAL auth_schema_enabled=0;
54
SHOW VARIABLES LIKE 'auth_schema%';
56
auth_schema_enabled OFF
57
auth_schema_table `auth`.`users`
58
connect(localhost,test_user,test_pass,test,MASTER_PORT,);
59
ERROR 28000: Access denied for user 'test_user' (using password: YES)
60
SET GLOBAL auth_schema_enabled=1;
61
SHOW VARIABLES LIKE 'auth_schema%';
63
auth_schema_enabled ON
64
auth_schema_table `auth`.`users`
65
SELECT 'auth re-enabled';
68
connect(localhost,"'; drop table auth.users; select '",test_pass,test,MASTER_PORT,);
69
ERROR 28000: Access denied for user '"'; drop table auth.users; select '"' (using password: YES)
70
SHOW TABLES FROM auth;
74
SET GLOBAL auth_schema_table=NULL;
75
ERROR HY000: Incorrect arguments to SET
76
SHOW VARIABLES LIKE 'auth_schema_table';
78
auth_schema_table `auth`.`users`
79
SET GLOBAL auth_schema_table='';
80
ERROR HY000: Incorrect arguments to SET
81
SHOW VARIABLES LIKE 'auth_schema_table';
83
auth_schema_table `auth`.`users`