mysqldump: Couldn't execute 'show table status '解決方法


 

執行:[root@host2 lamp]# mysqldump -F -R -E --master-data=2   -p -A --single-transaction
在控制台端出現
mysqldump: Couldn't execute 'show table status like 'v\_bid\_bad'': SELECT command denied to user ''@'%' for column 'id' in table 't_bids' (1143)
在workbench進行select * from  v_bid_bad 出現:
10:29:20   SELECT * FROM sp.v_bid_bad LIMIT 0, 50000    Error Code: 1449. The user specified as a definer ('root'@'%') does not exist      0.000 sec
 屬於權限問題
 
 
修改方法有兩種:
1. 增加root@%帳戶和權限
grant all on *.* to 'root'@'%' identified by '00000';
 
2.修改view的definer
一般如是是在本機的話用:
select concat("alter DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW ",TABLE_SCHEMA,".",TABLE_NAME," as ",VIEW_DEFINITION,";") from information_schema.VIEWS whereTABLE_SCHEMA='sp'; 
再執行輸出的語句。
 
成功解決此問題.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM