在mysql同步中,从库很多情况下因为主库修改了存储过程而导致从库stop掉。
查看网上资料,搜出来这么一个参数:
log_bin_trust_function_creators = 1 默认为0是不允许function同步的。以前从来没注意过这个参数。
修改my.cnf 添加
log_bin_trust_function_creators = 1
重新启动数据库即可。
在mysql命令行中可以执行: show variables like ‘%function%’; 查看此功能是否关闭。
不修改my.cnf且重启直接打开
> stop slave;
> set global log_bin_trust_function_creators = 1;
> start slave;
原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/1711.html