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

首頁 > 數據庫 > MySQL > 正文

MySQL創建函數出現1418錯誤解決辦法總結

2024-07-24 12:37:39
字體:
來源:轉載
供稿:網友

本文章來給大家介紹關于MySQL創建函數出現1418錯誤解決方法,出現這種問題我們只要簡單的一句就可以解決了.

錯誤碼:1418

  1. 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) 這個是創建函數功能未開。 
  2. (you *might* want to use the less safe log_bin_trust_function_creators variable)  
  3. (0 ms taken) 

分析:根據系統提示,導致該錯誤的原因可能是一個安全設置方面的配置,查手冊.

log_bin_trust_function_creators參數缺省0,是不允許function的同步的,一般我們在配置repliaction的時候,都忘記關注這個參數,這樣在master更新funtion后,slave就會報告錯誤,然后slave stoped.

處理過程:登陸mysql數據庫.

  1. set global log_bin_trust_function_creators = 1; 
  2. > start slave; 
  3. mysql> set og_bin_trust_function_creators =1; 
  4. ERROR 1193 (HY000): Unknown system variable 'og_bin_trust_function_creators' 
  5. mysql> set log_bin_trust_function_creators =1; 
  6. ERROR 1229 (HY000): Variable 'log_bin_trust_function_creators' is a GLOBAL variable and should be set with SET GLOBAL 
  7. mysql> set global log_bin_trust_function_creators =1; 
  8. Query OK, 0 rows affected (0.00 sec) 
  9. mysql> show variable like '%func%'
  10. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'variable like '%func%'' at line 1 
  11. mysql> show variables like '%func%'
  12. +---------------------------------+-------+ 
  13. | Variable_name                   | Value | 
  14. +---------------------------------+-------+ 
  15. | log_bin_trust_function_creators | ON    | 
  16. +---------------------------------+-------+ 
  17. 1 row in set (0.01 sec)  --Vevb.com 
  18. mysql> commit
  19. Query OK, 0 rows affected (0.00 sec) 
  20. mysql> 

跟蹤mysql的啟動日志,slave正常運行,問題解決.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 平远县| 阿荣旗| 乐亭县| 邵武市| 瑞昌市| 松桃| 云霄县| 夏河县| 晋中市| 鹤壁市| 盐亭县| 林芝县| 金坛市| 博罗县| 竹北市| 沂源县| 开江县| 高台县| 泊头市| 乌拉特前旗| 铜山县| 钟祥市| 保康县| 宜城市| 曲阳县| 内丘县| 会东县| 永顺县| 五寨县| 靖远县| 南华县| 仙游县| 察雅县| 龙游县| 徐闻县| 乡城县| 南充市| 腾冲县| 新化县| 东源县| 涟水县|