While restoring account on cpanel server if you get following error
Sorry, a mysql user with the name x already exists. then try to delete database user from mysql command line
#mysql
mysql > drop user 'xxxxx'@'localhost';
Afer deleting the username if you still face the same issue then search the user in following directory and remove the username from the files.
grep -Rl USERNAME /var/cpanel/databases/
You can see database username under following file.
/var/cpanel/databases/dbindex.db.cache
/var/cpanel/databases/users.db
/var/cpanel/databases/users.db.cache
/var/cpanel/databases/dbindex.db
You need to delete the username from files and save file, then again try to restore account.