Uploading SQL Error

He has: 6 posts

Joined: Jul 2006

Hi,

I am just opening a new site and I am trying to use my database from my old site so that I do not have to add all the products again. About 600! But I am getting this error when I try and use the sql file that I downloaded from phpmyadmin. My host wont help me with it for some reason so I would really like your help!

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 'ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1' at
line
lsh413:~/www$

Just wonding if anyone here has any ideas. The database is about 22mb in size and I am trying to upload it to a unix server and the original was also on a unix server.

Thanks,
Jamie

Sites I Have Built:
Sex Shop Canada (Warning Sex Toy Site)

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Check what version of mySQL is on each server. I know I tried to test an export from version 5 of mySQL on an older server and it errored out. Back on a v5 server again it worked fine. Try doing a search and replace on the file, searching for ENGINE=MyISAM DEFAULT CHARDET=latin1 and replace it with either a blank, or just a space. As long as when you set up the databases to begin with you didn't specify anything other than defaults for ENGINE and CHARSET, it should work fine.

-Greg

He has: 6 posts

Joined: Jul 2006

Greg K wrote: Check what version of mySQL is on each server. I know I tried to test an export from version 5 of mySQL on an older server and it errored out. Back on a v5 server again it worked fine. Try doing a search and replace on the file, searching for ENGINE=MyISAM DEFAULT CHARDET=latin1 and replace it with either a blank, or just a space. As long as when you set up the databases to begin with you didn't specify anything other than defaults for ENGINE and CHARSET, it should work fine.

-Greg

Wow it worked great! Thanks so much!, That saved me hours of work. My host couldn't even help me with that.

Thanks again!
Jamie

Sites I Have Built:
Sex Shop Canada (Warning Sex Toy Site)

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.