Forum Moderators: open
On server1 I did:-
mysqldump --opt mydatabase > backup.sql
On server2 I'm trying:-
mysql mydatabase_backup < backup.sql
... and it generates the following error:-
ERROR 1064 at line 20: 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 'CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`anumber` bigi
The actual line that appears to be tripping it up is this one, right at the very start and on the first table create:-
CREATE TABLE `CDR` (
`datetime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`anumber` bigint(20) NOT NULL default '0',
Any thoughts? Is this a cross-compatability error between the differing versions of MySQL?
Server1 is 4.1.8-standard.
Server2 is 4.0.18
Thanks for any thoughts.
TJ
JK
might work (add the --compatible to what you're already doing with mysqldump). I'm not entirely sure that's compatible with 4.0.x, though. To go way back, you can try:
mysqldump --compatible=mysql323
However, that may cause problems due to the difference between
TYPE=MyISAM
and
Engine=MyISAM
in 3.23 vs 4.x . I'd try the 40 compatibility first, then the 323.
Or just take out the "default CURRENT_TIMESTAMP" bits where you find them.
Or upgrade the 4.0 server to 4.1.
JK
I've also been known to compile the servers from source, though.
Do you know how the 4.0.x got installed in the first place? I don't *think* there is an official update process, but you might go check mysql.com and see if there is. Most of their info seems to be for version 5.x now, though.
JK
MySQL 4.0.18 came with it.
I've grabbed the 4.1.8 RPM from MySQL (that matches the version currently on my live server).
I guess I need to uninstall the old one first?
Thanks - I'm OK at running things and generally messing with *nix, but I'm not up to speed on installing stuff....!
TJ
Just a quick question. Have you read the release notes on this newer version? What new features does this latest version have that you want to take advantage of?
If there is nothing major that you want to take advantage of you may want to consider holding off on your upgrade. I mean upgrading for the sake of upgrading isn't always worth it especially considering the headache you seem to be having with the whole thing.
Which I could help with the export but I am not a MySQL guy.
TJ: Doesn't Mandrake use rpm? If so, you may be able to do "rpm -Uvh new-mysql.rpm" and have it upgrade to the new rpm.
The problem is that if you got the new version from Mysql.com, and the old version came with Mandrake, they're likely to be two different setups.
So ...
I would first see if there is a later version available from Mandrake.
If not, then, yes, you may have to uninstall the current Mysql and install the new RPM.
(I feel like I'm being awfully vague, but there are a lot of variables to consider, and I'm trying to cover all the bases without getting too far afield.)
IMPORTANT! Do a mysqldump on your current data before upgrading "just in case."
JK
Jolly - this is a "virgin" server - there's nothing on it at all. Might actually be easier for me to just download the latest version of Mandriva, or even try Fedora Core 4 (3 was the last one I tried and that didn't like my SCSI card).
You're right about version compatability - I tried the rpm -Uvh with the MySQL RPM and it barfed...
As I don't have anything installed on this machine yet, I am cosidering toying with OS's a bit more. Fedora Core 4 being downloaded now. I'll know by the first CD if it's going to work with the SCSI card or not!
TJ
Also, did you try uninstalling all MySQL rpms before installing the new ones? You'd probably have to uninstall mysql, mysql-devel, and maybe mysql-perl then reinstall from the new MySQL rpms. On the other hand, if the rpms from MySQL are built for Redhat or Fedora, there may be library incompatibilities with Mandrake.
Grr.
So many variables, like I said.
JK
Currently downloading Red Hat Enterprise and I'll give that a go.
Apparently Red Hat SMB 9.0 will work on this box with this SCSI card, but I can't find anywhere to download that anymore.
Where's Archie when you need it?!
TJ