MYSQL設置觸發器權限成績的處理辦法。本站提示廣大學習愛好者:(MYSQL設置觸發器權限成績的處理辦法)文章只能為提供參考,不一定能成為您想要的結果。以下是MYSQL設置觸發器權限成績的處理辦法正文
本文實例講述了MYSQL設置觸發器權限的辦法,針對權限毛病的情形異常適用。詳細剖析以下:
mysql導入數據提醒沒有SUPER Privilege權限處置,以下所示:
ERROR 1419 (HY000): You do not have the SUPER Privilege and Binary Logging is Enabled
導入function 、 trigger 到 MySQL database,報錯:
You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)”.
緣由:
function / trigger 中有dangerous statements修正數據庫,毛病只在啟用binary logging選項停止主從復制的辦事器上湧現。
處理辦法以下:
1)導入數據的用戶不只須要CREATE ROUTINE, ALTER ROUTINE, CREATE TRIGGER, ALTER TRIGGER, CREATE FUNCTION 和 ALTER FUNCTION 權限,還須要SUPER privileges 權限,應用超等用戶導入數據。
2)讓一切用戶具有履行相似functions的權限,風險,不推舉,
o by specifying it on the server start, like: –log-bin-trust-function-creators=1 o by setting it to 1 through the SET GLOBAL statement, like: mysql> SET GLOBAL log_bin_trust_function_creators = 1;
3)假如不須要復制,或許是從庫,封閉binlog,
# binary logging – not required for slaves, but recommended #log-bin=mysql-bin # binary logging format – mixed recommended #binlog_format=mixed
願望本文所述對年夜家的MySQL數據庫設計有所贊助。