Syntax error when uploading database in phpmyadmin

They have: 4 posts

Joined: Jul 2005

Hi i am uploading a database to a newer version of mysql than where it was originally hosted.

My problem is it is giving me syntax errors. Is there a way for me to be able to sort this out so it will upload succesfully. I am no expert at all on db's so any help is appreciated on this

They have: 19 posts

Joined: May 2005

Sounds like you have something wrong in the database flat file.

Can you paste this file or is it sensitive info?

Could be something as silly as a ' in the wrong spot.

They have: 222 posts

Joined: Sep 1999

The syntax of MySQL commands changed from 4.0.x to 4.1.x, so that's probably the problem. You can use a text-editor's Replace feature to fix the commands in the .sql file.

gfawce1's picture

They have: 8 posts

Joined: Aug 2005

I've also found similar problems exist if you've dumped the file out to an .sql file using one version of phpmyadmin and are trying to import it using a new version of phpmyadmin. If it's still not working, open up the sql file and try doing addin the file chunk by chunk to the sql query window of phpmyadmin.

Hope that helps!

Busy's picture

He has: 6,151 posts

Joined: May 2001

What is the error?

A common error is Default ''; or Default '0'; fix is to remove the default bit

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.