When trying to restore database backup created with PhpMyAdmin the following error occurs:
================
Error
SQL query:
–
– Database: ´database_name´
–
CREATE DATABASE ´database_name´ DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
MySQL said: Documentation
#1044 – Access denied for user ‘user_name@’%’ to database ‘database_name’
================
Note: database_name is the name of the database you are trying to take backup
user_name is the username of database 'database_name'
Resolution:
To solve this issue delete following lines from databasebackup file using a text editor:
—–
CREATE DATABASE ´database_name´ DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE ´database_name´;
—–
Note: database_name is the name of the database you are trying to take backup.