List:General Discussion« Previous MessageNext Message »
From:Victoria Reznichenko Date:May 27 2004 7:56am
Subject:Re: error restoring and dumping
View as plain text  
Fajar Priyanto <fajarpri@stripped> wrote:
> 
> Hi all,
> I'm trying to move my Mambo (content management) database from one server into
> another.
> 
> In the old server, the mysql version is 4.0.13, while in the new one it's
> 4.0.15.
> 
> The error was when restoring:
> ERROR 1064 at line 141: 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 'option varchar(50) DEFAULT '' NOT NULL,
>  ordering int(11) unsi
> 
> These are the corresponding lines:
> 
> #
> # Table structure for table `mos_components`
> #
> 
> CREATE TABLE mos_components (
>  id int(11) NOT NULL auto_increment,
>  name varchar(50) NOT NULL default '',
>  link varchar(255) NOT NULL default '',
>  menuid int(11) unsigned NOT NULL default '0',
>  parent int(11) unsigned NOT NULL default '0',
>  admin_menu_link varchar(255) NOT NULL default '',
>  admin_menu_alt varchar(255) NOT NULL default '',
>  option varchar(50) NOT NULL default '',
>  ordering int(11) unsigned NOT NULL default '0',
>  admin_menu_img varchar(255) NOT NULL default '',
>  iscore tinyint(4) NOT NULL default '0',
>  PRIMARY KEY  (id)
> ) TYPE=3DMyISAM;
> 
> Is there any syntax that I should fix?

OPTION is a reserved word in MySQL:
	http://dev.mysql.com/doc/mysql/en/Reserved_words.html

Use backticks to quote column names: `option`.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   Victoria.Reznichenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




Thread
error restoring and dumpingFajar Priyanto27 May
  • Re: error restoring and dumpingVictoria Reznichenko27 May
    • Re: error restoring and dumpingFajar Priyanto27 May