一、前言
? ? ?開發給了一個帶函數的sql文件讓我執行,但是執行導入時報以下錯誤
? ? ?This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled
二、解決
在數據庫命令行中執行以下命令(臨時生效)
set global log_bin_trust_function_creators=TRUE;
編輯數據庫配置文件(永久生效)
vi /etc/my.cnf
log_bin_trust_function_creators=1
重啟數據庫服務
systemctl restart mysqld