Restore backup MySQL failed

When restoring backup script breaks on importing MySQL database contents with error:

Restore failed : SQL grant all on username.* to ‘ftp@domain’@‘localhost’ with grant option failed : You are not allowed to create a user with GRANT

I’ve notice it only happens on users which were created for vhost just to connect to database not the main user.

Ubuntu 20.04 MySQL 8

read it once again… your solution is in the message…

When the backup being loaded does the user being re-created? Should I give user GRANT privileges before backup restoration?

when backup is created its under the domain - user - so it should be recreated under that user. if db have sort of privileges - it would be restored. - user should not be created unless restoring whole domain within user = whole server.

Backup/restore process is automatic so what can be done to fix the issue?

Of course it’s automatic, you need to create backup which you did however levels of backup… Try to create user and same domain and then restore… It should work without issues. You’re system administrator right?

I’m restoring to the same domain with the same user already created :slight_smile: The backup was taken 2 weeks ago and I’m restoring only home directory / mail / mysql

ok - does the user exist in current settings in system?

im after night shift and my eyes are very heavy. Im sorry but going to sleep. good luck out there.

Thanks for your help :slight_smile: and good night

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.