昨天测试服务器重启,mysql不能正常启动,后来由于业务的需要将内网的数据库迁移到测试服务器上,在还原数据库时报错如下:
[email protected]:~/sql$ mysql -uroot -p‘1qaz2wsx3edc‘ < csip_business.sql
ERROR 1418 (HY000) at line 2945731: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
报错原因:开启bin-log
解决方法:编辑主配置文件/etc/my.cnf,将如下3行注释掉
#log-bin=mysql-bin
#binlog_format=mixed
#server-id = 1
时间: 2024-11-02 05:02:02