日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql创建函数1418_Mysql中创建函数报“ERROR 1418 ”的解决方法

發(fā)布時間:2025/4/16 数据库 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql创建函数1418_Mysql中创建函数报“ERROR 1418 ”的解决方法 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

我們在使用mysql數(shù)據(jù)庫開發(fā)項目的時候,有時Mysql系統(tǒng)自帶的函數(shù)不能完全滿足我們開發(fā)的需要,解決方法是自己創(chuàng)建函數(shù),可以有可能在你創(chuàng)建函數(shù)的過程事會報出Error

1418錯誤,對于報這種錯誤的詳細信息如所所示

出錯信息大致類似:

ERROR 1418 (HY000): 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)

ERROR 1418 (HY000): 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)

解決方法:MySQL函數(shù)不能創(chuàng)建,是未開啟功能:

mysql> show variables like '%func%';

+---------------------------------+-------+

| Variable_name | Value |

+---------------------------------+-------+

| log_bin_trust_function_creators | OFF |

+---------------------------------+-------+

1 row in set (0.00 sec)

mysql> set global log_bin_trust_function_creators=1;

Query OK, 0 rows affected (0.00 sec)

mysql> show variables like '%func%';

+---------------------------------+-------+

| Variable_name | Value |

+---------------------------------+-------+

| log_bin_trust_function_creators | ON |

+---------------------------------+-------+

1 row in set (0.00 sec)mysql>

如果上方法不能成功解決mysql中的ERROR 1418錯誤,那還得請你使用下面方法試試:

第一步: mysql> SET GLOBAL log_bin_trust_function_creators =

1;

第二步: 系統(tǒng)啟動時 --log-bin-trust-function-creators=1

第三步: 在my.ini(Linux下為my.conf)文件中 [mysqld] 標記后加一行內(nèi)容為

log-bin-trust-function-creators=1

總結(jié)

以上是生活随笔為你收集整理的mysql创建函数1418_Mysql中创建函数报“ERROR 1418 ”的解决方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。