Mysql Version Compatibility Issues
I was exporting a Mysql database from a 4.1.x build to a 3.x build on another machine. When importing, I was getting the message
“ERROR 1064 at line 20: You have an error in your SQL syntax near ‘DEFAULT CHARSET=latin1′ at line 6″
Line 6 of my exported database .sql file was
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
If I delete the DEFAULT CHARSET=latin1 portion, it still has an error about the ENGINE=MyISAM portion. Mysql 4.0.x or 3.x were expecting instead
) TYPE=MyISAM;
I initially thought to look in the configuration files to change the post-table output, but couldn’t find anything. I then tried looking for a table-output-template, but wasn’t successful there either. I eventually just uninstalled 4.1.x and installed 4.0.x so that I wouldn’t have to worry about compatibility.
How annoying…
Edit 9/13:
You may or may not have to delete /var/db prior to reinstalling… if I did not I got an error something similar to
/usr/local/libexec/mysqld: Can’t open file: ‘host.MYI’. (errno: 142)
Fatal error: Can’t open privelege tables: File ‘/usr/local/share/mysql/charsets/?.conf’ not found (Errcode: 2)
Aborting
Also, if you use PHP or anything else that depends on the mysql build, you’ll of course have to rebuild those (including php4-mysql which is managed by php4-extensions). I had quite a hassle with my mysql.so file from php4-mysql… maybe you won’t, maybe you will.

Teh Blarg » AJAX on my site Said,
September 15, 2005 @ 4:20 pm
[...] P.S. I noticed in IE (and only IE) that my text seems to be “sucked” to the left after the blockquotes (as seen in this post). Can anyone figure out why? It is unrelated to the ajax development I’ve been doing… « Mysql Version Compatibility Issues [...]
dammit Said,
September 18, 2005 @ 3:20 am
you can use –compatibility option for mysqldump, then you won’t need to do any manual compatibility jobs. check out mysqldump manual on mysql.com
Raybdbomb Said,
September 18, 2005 @ 7:51 am
Yea but all of my mysql exports were done through phpMyAdmin, and I checked for a little bit to see if there were anyway to feed it extra options and wasn’t able to come up with any…