<button id="qvlbh"><button id="qvlbh"></button></button>
<xmp id="qvlbh"><xmp id="qvlbh"><xmp id="qvlbh"><address id="qvlbh"><output id="qvlbh"></output></address>
<xmp id="qvlbh"><legend id="qvlbh"></legend>
<xmp id="qvlbh"> <address id="qvlbh"><output id="qvlbh"></output></address>
<address id="qvlbh"><button id="qvlbh"></button></address>
<button id="qvlbh"><samp id="qvlbh"></samp></button>
<address id="qvlbh"><button id="qvlbh"></button></address><address id="qvlbh"></address>
<address id="qvlbh"><legend id="qvlbh"></legend></address>
<samp id="qvlbh"><xmp id="qvlbh"><legend id="qvlbh"></legend>
中國站
幫助中心 > 數據庫 > 云數據庫MySQL > 常見(jiàn)問(wèn)題 > 出現“OPERATION need to be executed set by ADMIN”報錯

出現“OPERATION need to be executed set by ADMIN”報錯

問(wèn)題描述

  • 在創(chuàng )建存儲過(guò)程、函數、觸發(fā)器、事件、視圖的時(shí)候出現如下錯誤。
  • 從本地數據庫導出SQL,在RDS上應用該SQL的時(shí)候出現如下錯誤。
  • 從RDS MySQL 5.6實(shí)例下載邏輯備份,導入到RDS或本地數據庫中,出現如下錯誤,錯誤代碼為1227和1725。
  • 執行MySQL語(yǔ)句修改參數時(shí),出現如下錯誤。
  1. [Err] 1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation --常見(jiàn)于RDS MySQL 5.6
  2. ERROR 1725 (HY000) at line 1936: OPERATION need to be executed set by ADMIN --常見(jiàn)于RDS MySQL 5.5
  3. ERROR 1227 (42000) at line 2984: Access denied; you need (at least one of) the SUPER privilege(s) for this operation

問(wèn)題原因

  • 導入RDS MySQL實(shí)例時(shí),SQL語(yǔ)句中含有需要Super權限的用戶(hù)才可以執行的SQL語(yǔ)句,而RDS MySQL不提供Super權限,因此需要刪除這類(lèi)語(yǔ)句。
  • 本地MySQL實(shí)例沒(méi)有啟用GTID。
  • 因數據庫賬號權限不足,無(wú)法通過(guò)執行MySQL語(yǔ)句修改部分參數(例如SET GLOBAL event_scheduler = 1)。

解決方案

  • 刪除DEFINER語(yǔ)句。

    1. 檢查SQL文件,刪除類(lèi)似如下SQL語(yǔ)句。

      1. DEFINER=`root`@`%`
    2. 在Linux系統中,可以嘗試使用如下命令刪除。

      1. sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/ ' your.sql > your_revised.sql
  • 刪除GTID_PURGED語(yǔ)句。

    說(shuō)明:
    也可以導出的時(shí)候在mysqldump命令后添加參數“—set-gtid-purged=off“來(lái)取消輸出GTID_PURGED子句。

    1. 檢查SQL文件,刪除類(lèi)似如下SQL語(yǔ)句。

      1. SET @@GLOBAL.GTID_PURGED='d0502171-3e23-11e4-9d65-d89d672af420:1-373, d5deee4e-3e23-11e4-9d65-d89d672a9530:1-616234';
    2. 在Linux系統中,可以嘗試使用類(lèi)似如下命令刪除。

      1. awk '{ if (index($0,"GTID_PURGED")) { getline; while (length($0) > 0) { getline; } } else { print $0 } }' your.sql | grep -iv 'set @@' > your_revised.sql
  • 請檢查您的權限后更換賬號,或對賬號授權后重新執行。如果您本人無(wú)權限操作賬號,請聯(lián)系您的管理員。

国产精品香港三级|日韩精品无码免费专区网站|熟女一区二区三区|一本伊大人香蕉久久网|jzzijzzij亚洲乱熟无码
<button id="qvlbh"><button id="qvlbh"></button></button>
<xmp id="qvlbh"><xmp id="qvlbh"><xmp id="qvlbh"><address id="qvlbh"><output id="qvlbh"></output></address>
<xmp id="qvlbh"><legend id="qvlbh"></legend>
<xmp id="qvlbh"> <address id="qvlbh"><output id="qvlbh"></output></address>
<address id="qvlbh"><button id="qvlbh"></button></address>
<button id="qvlbh"><samp id="qvlbh"></samp></button>
<address id="qvlbh"><button id="qvlbh"></button></address><address id="qvlbh"></address>
<address id="qvlbh"><legend id="qvlbh"></legend></address>
<samp id="qvlbh"><xmp id="qvlbh"><legend id="qvlbh"></legend>