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 67 68
|
include/master-slave.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
[connection master]
CREATE TABLE t1 (word CHAR(20) NOT NULL);
LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
SELECT * FROM t1 ORDER BY word LIMIT 10;
word
Aarhus
Aarhus
Aarhus
Aarhus
Aaron
Aaron
Aaron
Aaron
Ababa
Ababa
STOP SLAVE;
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
SET PASSWORD FOR root@"localhost" = 'foo';
START SLAVE;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
SET PASSWORD FOR root@"localhost" = '';
CREATE TABLE t3(n INT);
INSERT INTO t3 VALUES(1),(2);
SELECT * FROM t3 ORDER BY n;
n
1
2
SELECT SUM(LENGTH(word)) FROM t1;
SUM(LENGTH(word))
1022
DROP TABLE t1,t3;
CREATE TABLE t1 (n INT) ENGINE=MYISAM;
RESET MASTER;
include/stop_slave.inc
RESET SLAVE;
Warnings:
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
SELECT COUNT(*) FROM t1;
COUNT(*)
5000
include/save_master_pos.inc
RESET MASTER;
LOCK TABLES t1 READ;
include/start_slave.inc
include/sync_slave_io.inc
UNLOCK TABLES;
include/sync_slave_sql_with_io.inc
SELECT COUNT(*) FROM t1;
COUNT(*)
5000
DROP TABLE t1;
CREATE TABLE t1 (n INT);
INSERT INTO t1 VALUES(3456);
include/sync_slave_sql_with_master.inc
SELECT n FROM t1;
n
3456
DROP TABLE t1;
# mysql.user table restored to original values.
include/sync_slave_sql_with_master.inc
include/rpl_end.inc
|