1
include/master-slave.inc
3
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
7
CREATE TABLE t1 (f INT);
8
INSERT INTO t1 VALUES (10);
9
INSERT INTO t1 VALUES (20);
10
include/sync_slave_sql_with_master.inc
12
CREATE USER 'testuser'@'localhost';
13
GRANT CREATE ROUTINE ON test.* TO 'testuser'@'localhost';
14
GRANT REPLICATION CLIENT ON *.* TO 'testuser'@'localhost';
16
CREATE DEFINER='testuser'@'localhost' PROCEDURE row_cnt()
18
SELECT COUNT(*) as total_rows FROM test.t1;
20
include/sync_slave_sql_with_master.inc
22
include/assert.inc [Assert that mysql.procs_priv table is empty]
24
include/assert.inc [Assert that mysql.procs_priv table is empty]
26
DROP PROCEDURE row_cnt;
27
include/sync_slave_sql_with_master.inc
29
CREATE PROCEDURE row_cnt()
31
SELECT COUNT(*) as total_rows FROM test.t1;
33
include/sync_slave_sql_with_master.inc
35
include/assert.inc [Assert that mysql.procs_priv table is empty]
37
include/assert.inc [Assert that mysql.procs_priv table is empty]
39
DROP PROCEDURE row_cnt;
40
include/sync_slave_sql_with_master.inc
41
CREATE DEFINER='testuser'@'localhost' PROCEDURE row_cnt()
43
SELECT COUNT(*) as total_rows FROM test.t1;
45
include/sync_slave_sql_with_master.inc
47
include/assert.inc [Assert that mysql.procs_priv table has one row for testuser]
49
include/assert.inc [Assert that mysql.procs_priv table has one row for testuser]
50
DROP PROCEDURE row_cnt;
51
include/sync_slave_sql_with_master.inc
52
CREATE PROCEDURE row_cnt()
54
SELECT COUNT(*) as total_rows FROM test.t1;
56
include/sync_slave_sql_with_master.inc
58
include/assert.inc [Assert that mysql.procs_priv table has one row for testuser]
60
include/assert.inc [Assert that mysql.procs_priv table has one row for testuser]
63
DROP PROCEDURE row_cnt;
64
DROP USER 'testuser'@'localhost';