Luke Beale Posted September 28, 2006 Share Posted September 28, 2006 Hello,I am trying to import a .sql file from my old host to my new host but the old host is not the same version of mysql that the new host is using.Old host mysql version: 4.1.21New host mysql version: 4.0.27Is there a way for me to conver the sql file from 4.1.21 to 4.0.27? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 28, 2006 Share Posted September 28, 2006 The sql file should still work. Strange why your host has downgraded mysql to 4.0.27 Quote Link to comment Share on other sites More sharing options...
Luke Beale Posted September 28, 2006 Author Share Posted September 28, 2006 [quote author=wildteen88 link=topic=109850.msg443169#msg443169 date=1159461866]The sql file should still work. Strange why your host has downgraded mysql to 4.0.27[/quote]No the file will not work as i am moving hosts.So the new host has a different version of mysql from the old host and so it wont allow me to put it into the database of the new host.Its a vbulletin backup of my forum (the sql file). Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 28, 2006 Share Posted September 28, 2006 Do you get any errors at all. Prehaps have a word with your host. Se if they can update MySQL or see if they can get your sql file to work. Quote Link to comment Share on other sites More sharing options...
Luke Beale Posted September 28, 2006 Author Share Posted September 28, 2006 [quote author=wildteen88 link=topic=109850.msg443174#msg443174 date=1159462745]Do you get any errors at all. Prehaps have a word with your host. Se if they can update MySQL or see if they can get your sql file to work.[/quote]I have asked them and they said they can not get it to work because of the sql file and their databases are different versions.I use big dump to try to import the 11 meg database file & the error i got was"You have an error in your SQL syntax. 'DEFAULT CHARSET=latin1' at line 13"Which i think had something to do with the different database versions. Quote Link to comment Share on other sites More sharing options...
fenway Posted September 28, 2006 Share Posted September 28, 2006 Use DEFAULT CHARACTER SET instead... there are a bunch of things like this. Quote Link to comment Share on other sites More sharing options...
Luke Beale Posted September 28, 2006 Author Share Posted September 28, 2006 [quote author=fenway link=topic=109850.msg443208#msg443208 date=1159468392]Use DEFAULT CHARACTER SET instead... there are a bunch of things like this.[/quote]Sorry i dont understand. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 28, 2006 Share Posted September 28, 2006 Basically open up the .sql file into a text editor such as wordpad. if you use ntoepad it may become unstable and crash the system.Now find any matches regarding:DEFAULT CHARSET=latin1and change it to DEFAULT CHARACTER SET=latin1 Quote Link to comment Share on other sites More sharing options...
Luke Beale Posted September 28, 2006 Author Share Posted September 28, 2006 I did what you said and i got this error.Error at the line 14: ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARACTER SET=latin1;MySQL: 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 'DEFAULT CHARACTER SET=latin1' at line 13 Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted September 28, 2006 Share Posted September 28, 2006 Try doing away with the default charset. SO remove anything matching [i]DEFAULT CHARACTER SET=latin1[/i] Quote Link to comment Share on other sites More sharing options...
Luke Beale Posted September 28, 2006 Author Share Posted September 28, 2006 [quote author=wildteen88 link=topic=109850.msg443227#msg443227 date=1159470419]Try doing away with the default charset. SO remove anything matching [i]DEFAULT CHARACTER SET=latin1[/i][/quote]now im getting an error to do with one of the tables of the forum."Error at the line 30: INSERT INTO `vbaccess` VALUES (11, 4, 1);"There must be a easier way of doing this or something Quote Link to comment Share on other sites More sharing options...
fenway Posted September 29, 2006 Share Posted September 29, 2006 You crossed versions, there are incompatabilities... especially since the dump didn't contain complete inserts. Quote Link to comment Share on other sites More sharing options...
Luke Beale Posted September 29, 2006 Author Share Posted September 29, 2006 its ok i put the tables in 1 by 1 it took me hours but it all works now.Thanks for the help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.