| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
connection master; |
| 4 |
CREATE USER u1@localhost IDENTIFIED BY 'abcdefghijk'; |
| 5 |
connect user_a, localhost, u1,'abcdefghijk',; |
| 6 |
connection user_a; |
| 7 |
SELECT CURRENT_USER; |
| 8 |
CURRENT_USER |
| 9 |
u1@localhost |
| 10 |
disconnect user_a; |
| 11 |
connection master; |
| 12 |
CREATE USER IF NOT EXISTS u2@localhost; |
| 13 |
connect user_a, localhost, u2,,; |
| 14 |
connection user_a; |
| 15 |
SELECT CURRENT_USER; |
| 16 |
CURRENT_USER |
| 17 |
u2@localhost |
| 18 |
disconnect user_a; |
| 19 |
connection master; |
| 20 |
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; |
| 21 |
User Password plugin authentication_string |
| 22 |
u1 *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 mysql_native_password *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 |
| 23 |
u2 mysql_native_password |
| 24 |
connection slave; |
| 25 |
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; |
| 26 |
User Password plugin authentication_string |
| 27 |
u1 *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 mysql_native_password *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 |
| 28 |
u2 mysql_native_password |
| 29 |
connection master; |
| 30 |
CREATE OR REPLACE USER u1@localhost IDENTIFIED BY 'abcdefghijk2'; |
| 31 |
connect user_a, localhost, u1,'abcdefghijk2',; |
| 32 |
connection user_a; |
| 33 |
SELECT CURRENT_USER; |
| 34 |
CURRENT_USER |
| 35 |
u1@localhost |
| 36 |
disconnect user_a; |
| 37 |
connection master; |
| 38 |
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; |
| 39 |
User Password plugin authentication_string |
| 40 |
u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E |
| 41 |
u2 mysql_native_password |
| 42 |
connection slave; |
| 43 |
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; |
| 44 |
User Password plugin authentication_string |
| 45 |
u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E |
| 46 |
u2 mysql_native_password |
| 47 |
connection master; |
| 48 |
CREATE USER u1@localhost; |
| 49 |
ERROR HY000: Operation CREATE USER failed for 'u1'@'localhost' |
| 50 |
DROP USER u3@localhost; |
| 51 |
ERROR HY000: Operation DROP USER failed for 'u3'@'localhost' |
| 52 |
connection slave; |
| 53 |
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; |
| 54 |
User Password plugin authentication_string |
| 55 |
u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E |
| 56 |
u2 mysql_native_password |
| 57 |
connection master; |
| 58 |
DROP USER IF EXISTS u1@localhost; |
| 59 |
DROP USER u2@localhost; |
| 60 |
DROP USER IF EXISTS u3@localhost; |
| 61 |
Warnings: |
| 62 |
Note 1974 Can't drop user 'u3'@'localhost'; it doesn't exist |
| 63 |
connection slave; |
| 64 |
SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; |
| 65 |
User Password plugin authentication_string |
| 66 |
include/rpl_end.inc |