MySQL Forums
Forum List  »  Backup

Error on views after restore a backup
Posted by: Alexander Ceballos
Date: September 16, 2022 05:56PM

I am getting backups in the following way:
mysqldump --user=$user --password=$password --skip-lock-tables --single-transaction --quick $database > $copia

The problem occurs after restore a backup and with some views for example:

select * from view_ac LIMIT 10;

Error 1449 (HY000): The user specifed as definer ('root'@'%') does not exist.

To solve the problem I execute the following instructions:
update user set host = '%' where user = 'root' and host='localhost';
flush privileges;

But the problem is that instructions enable the remote connections and that is a problem for the the security of my database server.

I have to tell that I have to restore 20 databases and I have a script that automatizes that task, so that is difficult to fix the problem in manual way.

Options: ReplyQuote


Subject
Views
Written By
Posted
Error on views after restore a backup
25
September 16, 2022 05:56PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.