I recently upgrade a MySQL database server from version 4.0.x to 5.0.x. I ran into a couple issues while trying to import the mysqldumps of the databases. I figured I would write about it.
Error 1064 (42000)
I was getting the following error while trying to import the mysqldumps of certain databases. Here was a couple of the solutions:
#1 An invalid character in a table or column name. In my particular case it was a dash. Version 5.0.x no longer allows dashes in table or column names.
#2 There are certain reserved words in MySQL5 and the mysqldump from version 4.0.x wasn’t escaping them properly for the import. I was able to rename the reserved words from something like option to tempoption and import the mysqldump. Then through phpMyAdmin I was able to rename the table or column name back to the original reserved word. Here is a reference of reserved words in MySQL 5.0.x