您的位置:首页 > 博客中心 > 数据库 >

还原mysql数据库时报错

时间:2022-03-14 00:13

昨天测试服务器重启,mysql不能正常启动,后来由于业务的需要将内网的数据库迁移到测试服务器上,在还原数据库时报错如下:

aaa@ubuntu:~/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



本文出自 “” 博客,请务必保留此出处

热门排行

今日推荐

热门手游