mysqldump -uroot -p --single-transaction --databases A B C D E F G H --master-data=2 > backup.sql
出现以下报错:
mysqldump: Couldn't execute 'show table status like 'view\_frist\_order'': SELECT command denied to user ''@'localhost' for column 'usr_user_id' in table 'ord_order' (1143)
修改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';
再执行输出的语句。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28939273/viewspace-2215855/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28939273/viewspace-2215855/