1. 程式人生 > >mysql 匯入sql檔案,出現ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL報錯

mysql 匯入sql檔案,出現ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL報錯

ERROR 1418 (HY000): This function has none of DETERMINISTIC, NO SQL, or READS SQL

mysql的設定預設是不允許建立函式

1、更改全域性配置

      SET GLOBAL log_bin_trust_function_creators = 1;  

      有主從複製的時候 , 從機必須要設定  不然會導致主從同步失敗

2、更改配置檔案my.cnf  

      log-bin-trust-function-creators=1   重啟服務生效