mysql無法導入函數和存儲過程解決方法

Track: http://www.net527.cn/shujukuguanli/Mysql/2010/0602/11113.html


mysql 創建函數時出現 Error Code : 1418 錯誤解決辦法2008-08-19 17:08Error Code : 1418

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)

(0 ms taken)

 

 

1. mysql> SET GLOBAL log_bin_trust_function_creators = 1;

2. 系統啓動時 --log-bin-trust-function-creators=1

3. 在my.ini(linux下爲my.conf)文件中 [mysqld] 標記後加一行內容爲 log-bin-trust-function-creators=1

 

我成功測試第三種方法.第一種沒有成功,第二種沒有試過.



官方資料:

ERROR 1419 (HY000): You do not have the SUPER privilege and
binary logging is enabled (you *might* want to use the less safe
log_bin_trust_routine_creators variable)

你可能不想強制要求子程序創建者必須有SUPER權限。例如,你係統上所有有CREATE ROUTINE權限的用戶可能是有經驗的應用程序開發者。要禁止掉對SUPER權限的要求,設置log_bin_trust_routine_creators 全局系統變量爲1。默認地,這個變量值爲0,但你可以象這樣改變這樣:

mysql> SET GLOBAL log_bin_trust_routine_creators = 1;

你也可以在啓動服務器之時用--log-bin-trust-routine-creators選項來設置允許這個變量。

如果二進制日誌功能不被允許,log_bin_trust_routine_creators 沒有被用上,子程序創建需要SUPER權限。


http://dev.mysql.com/doc/refman/5.1/zh/stored-procedures.html#stored-procedure-logging


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章