SupportSkins Posted November 2, 2006 Share Posted November 2, 2006 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: ============ 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! Quote Link to comment Share on other sites More sharing options...
Guest Arild Posted November 2, 2006 Share Posted November 2, 2006 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 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 ; Quote Link to comment Share on other sites More sharing options...
SupportSkins Posted November 9, 2006 Author Share Posted November 9, 2006 Thanks a bunch. The issue was with "DEFAULT CHARSET = latin1" which was included in all the table structures in the exported file. Thanks again :innocent: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.