還原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不能正常啓動,後來因爲業務的須要將內網的數據庫遷移到測試服務器上,在還原數據庫時報錯以下: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
相關文章
相關標籤/搜索