If you get error with message ‘Sorry, a mysql user with the name username already exists.’ when restore a backup account using /script/restorepkg, follow this instruction ;
Enter SSH using root and delete all username match.
mysql
After you enter mysql console use this command, replace username with your username.
DROP USER 'username'@'localhost'; DROP USER 'username_prefix'@'localhost';
edit file /var/cpanel/databases/users.db using your favorit text editor.
nano /var/cpanel/databases/users.db
delete all content with username.
Done!.