mysql broken after dropping useless views

14 Views Asked by At

I have a mySQL database that I backup everyday like this:

/usr/bin/mysqldump --all-databases --events > "some_file_name"

This db contained a number of obsolete and useless views that I DROPped 2 days ago, after which my backup started complaining:

mysqldump: Got error: 1356: View 'xyz' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them when using LOCK TABLES

Now I guess I could recover all the old views from a previous file, only it seems a silly way to go.

Could somebody suggest how to solve this? I did search the Internet, but it mostly contain issues of "how to reliably save and restore views", which is not my problem. Thanks!

1

There are 1 best solutions below

0
troppapolvere On

Well, it appears that those views were not really independent, but rather calling each other in a multi-hyerarchy of layers.

Since (being careful) I started removing only the truly, really useless of them, I broke one or two of the remaining ones. Now I'll have to reconstruct the silly pyramid, and undo the thing layer by layer.

My bad....sorry for the noise