還原mysql數據庫時報錯

環境說明:
1.操作系統:
aaa@ubuntu:~$ cat /etc/issue
Ubuntu 12.04.3 LTS \n \l
2.內核版本:
aaa@ubuntu:~$ uname -a 
Linux ubuntu 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
3.Mysql的客戶端工具:SQLyogEn



昨天測試服務器重啓,mysql不能正常啓動,後來由於業務的需要將內網的數據庫遷移到測試服務器上,在還原數據庫時報錯如下:

aaa@ubuntu:~/sql$ mysql -uroot -p'12345678' < 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



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章