coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: isajade on July 11, 2007, 03:16:21 PM

Title: Server move: Error in SQL syntax when restoring database
Post by: isajade on July 11, 2007, 03:16:21 PM
Hi everyone,

Can you please help me, I followed the FAQ to move to another server and got an error in SQL syntax when I restored the database.

#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 'DEFAULT CHARSET=latin1' at line 36
The full line 36 is:
) ENGINE = MYISAM AUTO_INCREMENT =633 DEFAULT CHARSET = latin1


More infos:


Please let me know if you need more informations and thank you for taking the time to help me.
Title: Re: Server move: Error in SQL syntax when restoring database
Post by: Nibbler on July 11, 2007, 03:23:54 PM
The new server is running an older version of MySQL than your old server but you failed to use the compatibility options when exporting the database. Either export again with MySQL 4.0 compatibility or edit the sql file, removing references to 'DEFAULT CHARSET = latin1'
Title: Re: Server move: Error in SQL syntax when restoring database
Post by: isajade on July 11, 2007, 03:42:34 PM
Thank you, I removed the 'DEFAULT CHARSET = latin1' and it worked.

I run the gallery at http://gallery.juliebenz.net and got:
MySQL said: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Title: Re: Server move: Error in SQL syntax when restoring database
Post by: Nibbler on July 11, 2007, 03:56:43 PM
You'll need to talk to your host, that is not a Coppermine issue.
Title: Re: Server move: Error in SQL syntax when restoring database
Post by: isajade on July 11, 2007, 04:57:08 PM
Thank you again, I just did it.
Title: Re: Server move: Error in SQL syntax when restoring database
Post by: isajade on July 11, 2007, 05:45:25 PM
I just solved the last issue, here it is, it might help other users.

You need to update your include/config.inc.php file with the new database name, password etc.

Thanks again guys :)