Jump to content

Server Move -- MySQL Error


Recommended Posts

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!

Link to comment
Share on other sites

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 ;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...