SQL Import Fail

  • updated
  • Answered
Hi there,

I have been trying to move my wordpress site from TMD to inmotion. I have sucessfully moved all my FTP files but am having trouble with the SQL database.

I exported my SQL from the old site and created a new database on the new site, and then when I try to import the backup I get a 1044 error.

On TMD my databases all had a different prefix (everdale_), with inmotion they are (everda5_) could this be causing the problem - and how can I fix it?

*I did try the suggestions in the 1044 error troubleshooting post already - unfortunately that did not seem to help*
  • Answered

Thank you for your question Everdale!

Sorry for the trouble with the database import. When importing a database, the .sql file cannot have a CREATE sql statement in the code for creating the database. Creating databases can only be done in cPanel / MySQL databases. To get around this do the following.

1. Create the database in cPanel MySQL databases.

How do I create a MySQL database in my control panel (cpanel)?

2. Make a copy of your .sql file.

3. Open the copy of the SQL file in notepad or another text editor.

4. Find in the code (Usually at the beginning) that says to CREATE DATABASE. Should look similar to the following.

-- phpMyAdmin SQL Dump
-- version
-- http://www.phpmyadmin.net
-- Host: localhost
-- Generation Time: Apr 02, 2010 at 08:01 AM
-- Server version: 5.0.81
-- PHP Version: 5.2.6
-- --------------------------------------------------------

5. Delete the CREATE DATABASE line in the copy of the SQL file and save it.

6. Try to import the copy SQL into the database that was created in the MySQL databases through PhpMyAdmin.

How to Import a MySQL Database using phpMyAdmin

If these steps do not work, first, upload the SQL file to the server home directory.

Then, contact our live tech support team to explain the issue.  You can reach them via phone (757)416-6575, submitting a ticket through AMP,  or by chat.

Best Regards

James R