码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2015-08-19 13:01:52      阅读:714      评论:0      收藏:0      [点我收藏+]

标签:

 

执行:[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‘; 
再执行输出的语句。
 
成功解决此问题.

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

标签:

原文地址:http://www.cnblogs.com/zejin2008/p/4741646.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!