-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathadd_extra_root_users.inc
34 lines (30 loc) · 1.29 KB
/
add_extra_root_users.inc
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
# Within the WL#7158 records for the users root@127.0.0.1 and root@::1
# have been deleted from the script mysql-test/include/mtr_system_tables_data.sql
# that used to fill in system tables. Since this test relies on the presence of this
# records in the table mysql.user we add the users root@127.0.0.1 and root@::1
# into mysql.user explicitly.
--disable_warnings
--disable_query_log
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
CREATE USER IF NOT EXISTS 'root'@'127.0.0.1';
CREATE USER IF NOT EXISTS 'root'@'::1';
GRANT ALL ON *.* TO 'root'@'127.0.0.1', 'root'@'::1' WITH GRANT OPTION;
if ($extra_root_users_for_slave)
{
--echo # connecting to a slave to add accounts root@127.0.0.1, root@::1
let $os_version = `SELECT CONVERT(@@version_compile_os using latin1) NOT IN ("Win32","Win64","Windows")`;
if ($os_version)
{
connect (slave_init_con,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
}
if (!$os_version)
{
connect (slave_init_con,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK,PIPE);
}
CREATE USER IF NOT EXISTS 'root'@'127.0.0.1';
CREATE USER IF NOT EXISTS 'root'@'::1';
GRANT ALL ON *.* TO 'root'@'127.0.0.1', 'root'@'::1';
--connection default
}
--enable_query_log
--enable_warnings