Can MySQL reliably restore backups that contain views or not?

后端 未结 4 985
情书的邮戳
情书的邮戳 2021-02-04 14:15

Environment: Ubuntu 11.10, MySQL 5.1.58

I have a small database with views. When I try to dump and restore, I get

ERROR 1356 (HY000) at line 1693: View          


        
4条回答
  •  不思量自难忘°
    2021-02-04 15:08

    Couple of things:

    1.) Yes, you can create the views using some client BUT perhaps the owner of the tables is not the owner of the view, which leads to

    2.) Usually, doing backups of views in mysql includes some "useless garbage" like

    create algorithm xxx definer= sql security view  as ....
    

    and that user often includes the IP or machine name the user logged on when creating the view... SO, the view won't create properly. Check that out, might help you.

提交回复
热议问题