Friday, 28 August 2009

MySQL Export & Import Error – MySQL said: #1065 – Query was empty

Using the MySQL Administrator utility on our oldest and soon to be retired IIS 6 hosting boxes, we needed to export one of the last Joomla site’s databases.

After completing the export, we went into the MySQLAdmin manager that is a part of the Own Web Now’s Web hosting setup to import the database and we get:

image

This site was kinda informative:

image

Clean out the headers in the .SQL file. So, we tried that.

Before:

image

After:

image Still did not work. We cleaned out the rest of the headers with no success either as per the above article.

Note that the old boxes’ MySQL version was 5.0.22. We upgraded it to the 5.0.45 version on the destination servers and we still had no joy. Even after making a series of edits to the database headers.

We searched, and we searched with the searches turning up very little.

However, buried in all of the results was this little needle in the proverbial hay stack:

image

We tried the command verbatim with no joy.

A search on the “mysqldump –uroot –proot” command turned up:

image

We ended up with a command syntax like the following:

  • C:\Hosting\Site\DBs>mysqldump --user root --password=MyR00tP*ssW0rd! --compact --quick MyDb > MyDbBU.sql

We took that MyDbBU.sql file over to the hosting company’s MySQLAdmin import process with an empty database waiting there and we achieved our goal! :)

The database imported successfully. Once we upload the CMS content via FTP to the site, modify the Database references in the CMS to work with the new database name and database user access credentials the site should be up and running!

Philip Elder
MPECS Inc.
Microsoft Small Business Specialists
Co-Author: SBS 2008 Blueprint Book

*All Mac on SBS posts will not be written on a Mac until we replace our now missing iMac! (previous blog post)

Windows Live Writer

No comments: