1.创建MySQL用户
create user "username"@"ipaddr" identified by "password"
2.赋权限
MySQL5.7左右版本
grant replication slave on database.table to "user"@"ipaddr" identified by "password"
MySQL8版本
grant replication slave on *.* to 'user'@'ipaddr';
grant replication client on *.* to 'user'@'ipaddr';
3.sql格式修改
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION