NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page SQL version incompatibility, having trouble when importing SQL file

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-20-2006, 11:45 PM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: Vancouver
Posts: 533
shadow_boi is a jewel in the roughshadow_boi is a jewel in the roughshadow_boi is a jewel in the rough
 



SQL version incompatibility, having trouble when importing SQL file


I have a SQL file from my previous hosting. But now I use a new host, and want to export my SQL file into it. But I got syntax errors.

Nothing wrong with the SQL file, because it works well on my old host.
then I ask my server provider from my old host. He gave me this:
????: NamePros.com http://www.namepros.com/programming/169681-sql-version-incompatibility-having-trouble-when.html

Quote:
Our server is using
MySQL version 4.1.14-standard

Most servers that run MySQL version 4.0 or around that ballpark will have a hard time importing the SQL version due to version incompatibility.
Yea, the new host is using Mysql 4.0
and my old host uses MySQL version 4.1.14

Is there a way to import my SQL file succefully into my new host?
shadow_boi is offline  
Old 02-21-2006, 12:06 AM   #2 (permalink)
Senior Member
 
{insert name here}'s Avatar
Join Date: Dec 2004
Posts: 1,304
{insert name here} is a glorious beacon of light{insert name here} is a glorious beacon of light{insert name here} is a glorious beacon of light{insert name here} is a glorious beacon of light{insert name here} is a glorious beacon of light
 


Breast Cancer
Yeah, but it will take you some time.

Every line, actually only at the end of a table, looks like this in 4.1.xx:
Quote:
CREATE TABLE `GIFTS` (
...
...
ENGINE=MyISAM DEFAULT CHARSET=latin1;
)
You need to remove all the "DEFAULT CHARSET=latin1"
So it looks like this:
Quote:
CREATE TABLE `GIFTS` (
...
...
ENGINE=MyISAM;
)
If you do this, you will have no issues importing the new version into the older version.
__________________
You got no time for the messenger,
got no regard for the thing that you don't understand,
you got no fear of the underdog,
that's why you will not survive!
Last edited by OulZac; 02-21-2006 at 12:20 AM.
{insert name here} is offline  
Old 02-21-2006, 08:17 AM   #3 (permalink)
NamePros Member
Join Date: Feb 2006
Location: Chicago IL
Posts: 73
AllValley is an unknown quantity at this point
 



Yes. Copy the file into notepad and do a 'find-replace' replacing "DEFAULT CHARSET=latin1" with ""

Also, some hosts, if they own their own servers, will upgrade the version of software on request.
__________________
Hassle Free Computing and Web Solutions for Personal and Business!
Rochelle Network Communications!
AllValley is offline  
Old 02-21-2006, 10:14 AM THREAD STARTER               #4 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: Vancouver
Posts: 533
shadow_boi is a jewel in the roughshadow_boi is a jewel in the roughshadow_boi is a jewel in the rough
 



thanks for your help.
I have replaced "DEFAULT CHARSET=latin1" with "".
????: NamePros.com http://www.namepros.com/showthread.php?t=169681

but I still got error

Quote:
CREATE TABLE `faq` (

`faqname` varchar( 250 ) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL default '',
`faqparent` varchar( 50 ) NOT NULL default '',
`displayorder` smallint( 5 ) unsigned NOT NULL default '0',
`volatile` smallint( 5 ) unsigned NOT NULL default '0',
PRIMARY KEY ( `faqname` ) ,
KEY `faqparent` ( `faqparent` )
) ENGINE = MYISAM;

#1064 - 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 'collate latin1_bin NOT NULL default '',
`faqparent` varchar(5
it's also about latin.

Please help.
shadow_boi is offline  
Old 02-21-2006, 10:19 AM   #5 (permalink)
NamePros Member
Join Date: Feb 2006
Location: Chicago IL
Posts: 73
AllValley is an unknown quantity at this point
 



take out
Quote:
CHARACTER SET latin1 COLLATE latin1_bin
and see what happens...
????: NamePros.com http://www.namepros.com/showthread.php?t=169681

oops. didn't notice this

Quote:
) ENGINE = MYISAM;
The paren ")" should be between the MYISAM and the semi colon ;

So.. Replace "CHARACTER SET latin1 COLLATE latin1_bin" with ""
and replace " )ENGINE = MYISAM;" with "ENGINE = MYISAM);"

BAH! I need to read the SQL more carefully. You should not have ANY double quotes " in your sql so... when I said do a find-replace, and replace with "" I meant leave the field blank, not replace with " XD Sorry, should have been more clear.Just leave the replace field blank when you're trying to delete stuff.
__________________
Hassle Free Computing and Web Solutions for Personal and Business!
Rochelle Network Communications!
Last edited by AllValley; 02-21-2006 at 10:30 AM.
AllValley is offline  
Old 02-21-2006, 11:43 AM THREAD STARTER               #6 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: Vancouver
Posts: 533
shadow_boi is a jewel in the roughshadow_boi is a jewel in the roughshadow_boi is a jewel in the rough
 



problem solved.

Many many thanks to Superprogrammer and AllValley
shadow_boi is offline  
Old 02-21-2006, 11:47 AM   #7 (permalink)
Senior Member
 
superprogrammer's Avatar
Join Date: Aug 2004
Location: Washington
Posts: 4,327
superprogrammer has much to be proud ofsuperprogrammer has much to be proud ofsuperprogrammer has much to be proud ofsuperprogrammer has much to be proud ofsuperprogrammer has much to be proud ofsuperprogrammer has much to be proud ofsuperprogrammer has much to be proud ofsuperprogrammer has much to be proud of
 



Thanks ...
__________________
Download youtube videos at www.HugYouTube.com -NO LINKS TO PARKED PAGES-
Anonymous access at www.Banned.net
superprogrammer is offline  
Old 02-21-2006, 01:02 PM   #8 (permalink)
NamePros Member
Join Date: Feb 2006
Location: Chicago IL
Posts: 73
AllValley is an unknown quantity at this point
 



No problem.
__________________
Hassle Free Computing and Web Solutions for Personal and Business!
Rochelle Network Communications!
AllValley is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
****HUGE List of FREE File/Image/Video Hosts!**** thetzfreak Free Resources 31 02-12-2006 07:06 AM
Connecting to your SQL Database using Enterprise Manager priyanka[imported] Webmaster Tutorials 0 12-06-2004 09:58 PM
2 Huge Name Forsale Vegas Entertainment Domains For Sale - Make Offer 9 09-21-2004 03:37 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 11:00 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger