-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathconnection_skip_grant_table.result
66 lines (61 loc) · 1.92 KB
/
connection_skip_grant_table.result
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
call mtr.add_suppression("Plugin 'mysqlx' will be forced to shutdown");
call mtr.add_suppression("Unsuccessful login attempt: Invalid user or password");
call mtr.add_suppression("Internal account mysqlxsys@localhost can't be removed because server is running without user privileges ..skip-grant-tables. switch");
call mtr.add_suppression("Maximum number of authentication attempts reached");
call mtr.add_suppression("Access denied for user .*");
CREATE USER nonblank@localhost
IDENTIFIED WITH 'caching_sha2_password' BY 'valid_password';
Test starts here
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
nonblank@localhost nonblank@localhost *
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
#
# Try login with valid user when server started with
# skip-grant-tables and mysqlx loaded
#
# restart: --skip-grant-tables
#
# Connection should success with valid password
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
nonblank@ skip-grants user@skip-grants host *
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
#
# Connection should success with invalid password
RUN select user(),current_user(),@@bind_address
user() current_user() @@bind_address
nonblank@ skip-grants user@skip-grants host *
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
#
# Uninstall mysqlx plugin when the server is started with
# skip-grant-tables option
RUN uninstall plugin mysqlx
While executing uninstall plugin mysqlx:
Got expected error: Command not supported by pluggable protocols (code 3130)
Mysqlx.Ok {
msg: "bye!"
}
ok
#
# Enable back the "grant-tables", mysqlx client
# that uses invalid passord must be disconnected
FLUSH PRIVILEGES;
Warnings:
Warning 1681 'FLUSH PRIVILEGES' is deprecated and will be removed in a future release.
Application terminated with expected error: Access denied for user 'nonblank'@'localhost' (using password: YES) (code 1045)
ok
# restart:
DROP USER nonblank@localhost;