Upgrading MySQL

About

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.

Troubleshooting

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

http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedwords-5-0.html

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s