| 1 |
include/master-slave.inc |
| 2 |
Warnings: |
| 3 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 4 |
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. |
| 5 |
[connection master] |
| 6 |
create table t1 (n int auto_increment primary key); |
| 7 |
set insert_id = 2000; |
| 8 |
insert into t1 values (NULL),(NULL),(NULL); |
| 9 |
include/sync_slave_sql_with_master.inc |
| 10 |
select * from t1; |
| 11 |
n |
| 12 |
2000 |
| 13 |
2001 |
| 14 |
2002 |
| 15 |
SHOW SLAVE HOSTS; |
| 16 |
Server_id Host Port Master_id Slave_UUID |
| 17 |
2 127.0.0.1 SLAVE_PORT 1 SLAVE_UUID |
| 18 |
Warnings: |
| 19 |
Warning 1287 'SHOW SLAVE HOSTS' is deprecated and will be removed in a future release. Please use SHOW REPLICAS instead |
| 20 |
drop table t1; |
| 21 |
include/sync_slave_sql_with_master.inc |
| 22 |
stop slave; |
| 23 |
Warnings: |
| 24 |
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead |
| 25 |
include/wait_for_slave_to_stop.inc |
| 26 |
create table t2(id int auto_increment primary key, created datetime); |
| 27 |
set timestamp=12345; |
| 28 |
insert into t2 set created=now(); |
| 29 |
select * from t2; |
| 30 |
id created |
| 31 |
1 1970-01-01 06:25:45 |
| 32 |
create table t3 like t2; |
| 33 |
create temporary table t4 like t2; |
| 34 |
create table t5 select * from t4; |
| 35 |
start slave; |
| 36 |
Warnings: |
| 37 |
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead |
| 38 |
include/wait_for_slave_to_start.inc |
| 39 |
select * from t2; |
| 40 |
id created |
| 41 |
1 1970-01-01 06:25:45 |
| 42 |
show create table t3; |
| 43 |
Table Create Table |
| 44 |
t3 CREATE TABLE `t3` ( |
| 45 |
`id` int NOT NULL AUTO_INCREMENT, |
| 46 |
`created` datetime DEFAULT NULL, |
| 47 |
PRIMARY KEY (`id`) |
| 48 |
) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 49 |
show create table t5; |
| 50 |
Table Create Table |
| 51 |
t5 CREATE TABLE `t5` ( |
| 52 |
`id` int NOT NULL DEFAULT '0', |
| 53 |
`created` datetime DEFAULT NULL |
| 54 |
) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
| 55 |
drop table t2,t3,t5; |
| 56 |
drop temporary table if exists t4; |
| 57 |
include/sync_slave_sql_with_master.inc |
| 58 |
include/rpl_end.inc |