The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > UNIX and Linux Applications
.
google unix.com



UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sed error : Syntax error: redirection unexpected phpfreak Shell Programming and Scripting 3 12-04-2008 05:19 AM
nim mksysb error :/usr/bin/savevg[33]: 1016,07: syntax error astjen AIX 9 10-03-2008 11:44 AM
awk Shell Script error : "Syntax Error : `Split' unexpected Herry UNIX for Dummies Questions & Answers 2 03-17-2008 11:16 AM
I got error like...syntax error on line 1, teletype koti_rama UNIX for Advanced & Expert Users 2 07-07-2007 07:35 PM
awk syntax error k@ssidy UNIX for Dummies Questions & Answers 12 06-15-2005 10:00 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-24-2009
aneuryzma aneuryzma is offline
Registered User
  
 

Join Date: May 2009
Posts: 60
mysql syntax error ?

hi,

I receive this error when I export/import a table from a database to another one:

Code:
Error
SQL query:

--
-- Database: `mil`
--
-- --------------------------------------------------------
--
-- Table structure for table `jos_taoj`
--
CREATE TABLE IF NOT EXISTS  `jos_taoj` (

 `id` INT( 10 ) NOT NULL AUTO_INCREMENT ,
 `extension` VARCHAR( 100 ) NOT NULL COMMENT  'The extension',
 `version` VARCHAR( 16 ) NOT NULL COMMENT  'Version number',
 `installed_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT  'Date-time modified or installed',
 `log` MEDIUMTEXT,
PRIMARY KEY (  `id` ) USING BTREE,
KEY  `idx_extension` (  `extension` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 COMMENT =  'The Art of Joomla extension version history' AUTO_INCREMENT =2;

MySQL said: 

#1064 - Erreur de syntaxe près de 'USING BTREE,
  KEY `idx_extension` (`extension`)
) ENGINE=MyISAM' à la ligne 7
could you give me some help ?

thanks
  #2 (permalink)  
Old 07-24-2009
scottn scottn is online now Forum Advisor  
VIP Member
  
 

Join Date: Jun 2009
Location: Zürich, CH
Posts: 1,042
Hi.

Should it not be:

Code:
PRIMARY KEY USING BTREE(  `id` ),
Code:
Your SQL query has been executed successfully (Query took 0.0847 sec)

SQL query:
CREATE TABLE IF NOT EXISTS `jos_taoj` (
`id` INT( 10 ) NOT NULL AUTO_INCREMENT ,
`extension` VARCHAR( 100 ) NOT NULL COMMENT 'The extension',
`version` VARCHAR( 16 ) NOT NULL COMMENT 'Version number',
`installed_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Date-time modified or installed',
`log` MEDIUMTEXT,
PRIMARY KEY USING BTREE(
`id` 
),
KEY `idx_extension` ( `extension` ) 
) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =2;
  #3 (permalink)  
Old 07-24-2009
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,847
Are you exporting/importing between different MySQL versions?
Take a look at the --compatible option of the mysqldump command.
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0