I've been trying to work out the best way of copying structure & data from one database to another but the PHPMyAdmin export seems to churn out pretty poor scripts. The most obvious example is if I export a database (structure & data) then try and re-import on the same server (using the drop tables function to prevent clashes), I get a syntax error!? I would have thought PHPMyAdmin would be able to parse its own exports.
The error I get is:
Error SQL query:
$$
DROP PROCEDURE IF EXISTS `CMS_identifyFileType`$$
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$
DROP PROCEDURE IF EXISTS `CMS_identifyFileType`' at line 1
It looks odd to me that the script has weird apostrophes?
Does anyone have any tips on what I might be doing wrong? I have to manually add the 'use myDatabasename;' to the script to get it to work, not sure if I'm missing some other stuff.
My MySQL version is 5.1.73-community running on a Windows Server 2008 R2 server.
Thanks
Bob