MySQL Forums
Forum List  »  Newbie

Can't spot what's wrong in code
Posted by: ED DOWDALL
Date: April 07, 2014 09:43AM

Hi,

I am trying to export/import code from one MySQL install to another.
They are both version 5. The older one has a very old phpmyadmin interface.
Could that be messing up the export?

When I start the import, it stops on the very first statement after the "use" database. I had to add the "use".

I looked at a site that showed the syntax for the "create table" command, but it's just not popping out at me.

Can someone point me in the right direction?

Thanks,
Ed


code it's trying to import
--------------------------

CREATE TABLE IF NOT EXISTS `tcg_cat_profiles` (
`catid` int(11) NOT NULL auto_increment,
`display_name` varchar(100) NOT NULL default '',
`order` int(11) NOT NULL default '0',
PRIMARY KEY (`catid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;



error that I'm getting on import
--------------------------

Error

SQL query:

--
-- Database: `jbmpsite`
--
USE jbmpsite-- --------------------------------------------------------
--
-- Table structure for table `tcg_cat_profiles`
--
CREATE TABLE IF NOT EXISTS `tcg_cat_profiles` (

`catid` int( 11 ) NOT NULL AUTO_INCREMENT ,
`display_name` varchar( 100 ) NOT NULL default '',
`order` int( 11 ) NOT NULL default '0',
PRIMARY KEY ( `catid` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =3;



MySQL said: Documentation
#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 'CREATE TABLE IF NOT EXISTS `tcg_cat_profiles` (
`catid` int(11) NOT NULL auto' at line 11

Options: ReplyQuote


Subject
Written By
Posted
Can't spot what's wrong in code
April 07, 2014 09:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.