Environment: Ubuntu 11.10, MySQL 5.1.58
I have a small database with views. When I try to reset and restore, I get
ERROR 1356 (HY000) at line 1693: View 'curation2.condition_reference_qrm_v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
However, I can connect to the partially restored database and create the view myself. Therefore, I suspect that the error message is due to a problem not related to the view itself (but rather, as possible).
Here is a simple approach that I use to demonstrate the problem:
MYSQL_PWD='xxx' mysqldump -u root --routines -B curation \ | perl -pe 's/`curation`/`curation2`/' \ | MYSQL_PWD='xxx' mysql -u root
There are many other reports on the Internet about similar issues. The mysqldump man page has a cryptic note about errors with backup views, but it is written as a historical problem, not the current one.
So the question is: can MySQL reliably restore backups containing views or not? If possible, how? If not, what are people doing as a workaround?
Thanks Reece
mysql mysqldump mysql-management
Reece
source share