mysqlmysql-error-1044

MySQL import database fails


I have 2 MySQL databases 1_029f4ab_0 and 1_029f4ab_1

I want to copy the contents of 1_029f4ab_0 into 1_029f4ab_1

The structure of both databases are identical

  1. I EXPORTED a WordPress database 1_029f4ab_0 and file was saved as localhost.sql to my laptop

  2. In phpMyAdmin, I selected the second WordPress database 1_029f4ab_1 and chose "admin" in order to IMPORT the 1_029f4ab_0 database.

MySQL said: Documentation

#1044 - Access denied for user '1_029f4ab_1'@'localhost' to database '1_029f4ab_0'


Solution

  • Does your SQL file contain

    CREATE DATABASE 1_029f4ab_0;

    or

    USE 1_029f4ab_0;

    If so, delete those lines and re-run it. If you export the database from the top level in PHPmyadmin then sometimes it can add that in