Help - Search - Members - Calendar
Full Version: Server Move -- MySQL Error
CubeCart Forums > CubeCart Version 3 > Installation & Upgrade Help (Version 3)
SupportSkins
Hi,
I am moving my shopping cart from one server to another. I hav taken a back up of my existing data using CPanel's inbuilt phpMyAdmin. When I try to restore this database again using phpMyAdmin, I receive the following error:

============
CODE
Error

SQL-query :  

CREATE TABLE `CubeCart_Downloads` (

`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`customerId` int( 11 ) NOT NULL default '0',
`cart_order_id` varchar( 32 ) NOT NULL default '',
`noDownloads` int( 11 ) NOT NULL default '0',
`expire` int( 11 ) NOT NULL default '0',
`productId` int( 11 ) NOT NULL default '0',
`accessKey` varchar( 10 ) NOT NULL default '',
KEY `id` ( `id` )
)ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =28

MySQL said:

#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 AUTO_INCREMENT=28' at line 10

============

Is the error due to the number specified for AUTO_INCREMENT? If so I notice all the table structures have certain number assigned as AUTO_INCREMENT = 'number'

Any help I receive would be highly appreciated. Thank You!
Arild
I include a copy of my backupfile created by phpmyadmin, but from what i can se you are missing the closing ; in your code, or you got problems because of the auto_increment value of 28

QUOTE
CREATE TABLE `sbCubeCart_Downloads` (
`id` int(11) NOT NULL auto_increment,
`customerId` int(11) NOT NULL default '0',
`cart_order_id` varchar(32) NOT NULL default '',
`noDownloads` int(11) NOT NULL default '0',
`expire` int(11) NOT NULL default '0',
`productId` int(11) NOT NULL default '0',
`accessKey` varchar(10) NOT NULL default '',
KEY `id` (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
SupportSkins
Thanks a bunch. The issue was with "DEFAULT CHARSET = latin1" which was included in all the table structures in the exported file. Thanks again smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.