Hi there,
I’ve gone through the same situation when I was trying to import my database from old 1.5 version to a brand new 2.2 installation. I was getting the error:
—-
MySQL said:
#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 TABLE IF EXISTS wp_categories
‘ at line 1
—-
How I got over:
1 – backed up OLD database on sql format (extension .sql) using phpMyAdmin
2 – opened the backup file with Wordpad and changed it to new environment (because I moved my blog to a different domain and server) by updating domain name, server root directory, admin email, etc
3 – VERY IMPORTANT STEP: saved backup file as text file (extension .txt)
4 – changed the extension of the saved file (with the new environment variables) from extension TXT to extension SQL
5 – cleaned up new 2.2 installed database by dropping all tables in there (they were still empty)
6 – imported old database to the new 2.2 installation by using phpMyAdmin: I didn’t get any error this time!!
7 – signed in the new blog (I noticed there was some system errors but didn’t worry)
8 – when inside the admin area the first thing I got was a warning to upgrade database and I said yes…
9 – finally I went through all steps inside admin area for blog configuration
Now I have other changes in process but all posts, comments, users and so on are all there, in the new 2.2 installation.
Hope it works with you.