国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

MySQL創(chuàng)建函數(shù)報“ERROR 1418 ”錯誤,不能創(chuàng)建函數(shù)

2024-07-24 12:36:55
字體:
供稿:網(wǎng)友

MySQL創(chuàng)建函數(shù)報ERROR 1418錯誤,不能創(chuàng)建函數(shù),根據(jù)官方提示是說,不能創(chuàng)建函數(shù)可能是一個安全設(shè)置方面的配置或功能未開啟原因,下面我們一起來看.

錯誤: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)建,是未開啟功能.

根據(jù)系統(tǒng)提示,導(dǎo)致該錯誤的原因可能是一個安全設(shè)置方面的配置,查手冊log_bin_trust_function_creators參數(shù)缺省0,是不允許function的同步的,一般我們在配置repliaction的時候,都忘記關(guān)注這個參數(shù),這樣在master更新funtion后,slave就會報告錯誤,然后slave stoped.

處理過程:解決方法,MySQL函數(shù)不能創(chuàng)建,是未開啟功能,代碼如下:

  1. mysql> show variables like ‘%func%’; 
  2. +———————————+——-+ 
  3. | Variable_name | Value | 
  4. +———————————+——-+ 
  5. | log_bin_trust_function_creators | OFF | 
  6. +———————————+——-+ 
  7. 1 row in set (0.00 sec) 
  8. mysql> set global log_bin_trust_function_creators=1; 
  9. Query OK, 0 rows affected (0.00 sec)   //Vevb.com
  10. mysql> show variables like ‘%func%’; 
  11. +———————————+——-+ 
  12. | Variable_name                            | Value   | 
  13. +———————————+——-+ 
  14. | log_bin_trust_function_creators  | ON | 
  15. +———————————+——-+ 
  16. 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] 標(biāo)記后加一行內(nèi)容為 log-bin-trust-function-creators=1

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 洞口县| 拜泉县| 荥经县| 青铜峡市| 深水埗区| 西丰县| 博湖县| 龙门县| 泸定县| 齐齐哈尔市| 博白县| 常州市| 化州市| 鄯善县| 延寿县| 中西区| 瓦房店市| 佛山市| 芦山县| 华宁县| 彭山县| 平湖市| 开鲁县| 汉阴县| 阳朔县| 屏南县| 青田县| 图木舒克市| 平陆县| 紫云| 济南市| 顺平县| 安仁县| 新闻| 辽阳县| 五河县| 甘泉县| 年辖:市辖区| 阿拉善左旗| 柳江县| 东丽区|