在MySQL中当一个视图所依赖的的表有变化时,打开或修改视图会出现如下面的错误信息:
1356 - View 'database.view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them.
解决:
从MySQL的information_schema中的视图表View中,用下面的语句修复视图,如:
select VIEW_DEFINITION from information_schema.views where TABLE_SCHEMA='database' and TABLE_NAME='view'