一、mysql 資料庫binlog修改成row模式
修改mysql配置檔案 vim /etc/my.cnf,在[mysqld]和[mysqld_safe]中間添加
log_bin=mysql
binlog-format=ROW
server_id=1
binlog-do-db=指定資料庫名稱,可以沒有這行配置
二、service mysqld restart 重新開機mysql
三、檢查mysql是否正确開啟binlog并且是row模式
show master status;
show variables like '%log_bin%';
show variables;
四、XXX資料庫資訊:
資料庫位址域名(從庫):
從庫IP:
端口:
資料庫名:
需要建立新的使用者名和密碼,建立完并授權。
建立admin使用者 create user admin identified by "123456";
賦超級權限 grant all privileges on *.* to [email protected]'%';
賦超級權限 grant all privileges on *.* to [email protected]'指定ip';
賦監聽binlog權限grant select,replication slave,replication client on *.* to [email protected]'指定ip';
binlog簡析: