MySQL????????????????????????
???????????? ???????[ 2014/3/27 9:25:02 ] ????????MySQL ?????
????7????????????
???????File??Position????????y??????
mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 98 | | |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)
# ??????????????????????Empty set(0.00 sec)???????????my.cnf???????
????8?????????????220??????????????????????????yum???????????????δ???κθ????????????п?????
?????????????????????????mysql???????£????????????tar??????????mysqldump???????????????С?
??????????????
????1???????????????????
????# ??????
????????????б?????????????220????????????
????2????119???????????????????????????????е?6???????????????
????mysql> unlock tables;
????3????220??????????my.cnf??λ???????
????# ?????????????????[mysqld]???棬???????????????????????????????????????
[mysqld]
log-bin=mysql-bin
server-id=2
binlog-ignore-db=information_schema
binlog-ignore-db=cluster
binlog-ignore-db=mysql
replicate-do-db=test
replicate-ignore-db=mysql
log-slave-updates
slave-skip-errors=all
slave-net-timeout=60
master-host=192.168.2.119
master-user=root
master-password=pfingo
????4????220????????????????
????[root@localhost etc]mysql -h 192.168.2.119 -u ????? -p
????5????220??????????????
#????????MASTER MASTER_LOG_FILE??????File??MASTER_LOG_POS??????Position
#???????????????????е?master_log_file='mysql-bin.000001'?? master_log_pos=98;?????????????????е?show master status;???
mysql> slave stop;
mysql> change master to master_host='192.168.2.119'??master_user='root'??master_password='pfingo'??master_log_file='mysql-bin.000001'?? master_log_pos=98;
mysql> slave start;
????6???????????
????mysql> slave start;
????7?????в???
?????????????test??????????myTest???
mysql> CREATE TABLE `myTest` (
`id` INT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT ??
`username` VARCHAR( 20 ) NOT NULL ??
`password` CHAR( 32 ) NOT NULL ??
`last_update` DATETIME NOT NULL ??
`number` FLOAT( 10 ) NOT NULL ??
`content` TEXT NOT NULL ??
PRIMARY KEY ( `id` )
) ENGINE = MYISAM ;
???????????????????Ч?????????????????
??????????????????????????show slave statusG;
????mysql> show slave statusG;
????Slave_IO_Running: Yes(????????)??
????Slave_SQL_Running: Yes(???????)
????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11