LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 11-29-2005, 02:52 AM   #1
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Rep: Reputation: 16
Problem importing database back to MySql


I had Mambo running on my Slackware 9.x server just fine. I did a fresh install of 10.2, and now I cannot get the old database to import back to MySQL.

The error I get is
Code:
ERROR 1064 (42000) at line 145: 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) NOT NULL default '',
  ordering int(11) NOT NULL default '0',' at line 9
The referenced line in the import file is
Code:
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) NOT NULL default '0',
  admin_menu_img varchar(255) NOT NULL default '',
  iscore tinyint(4) NOT NULL default '0',
  params text NOT NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;
I am running the stock 4.1.14 MySQL that comes with Slackware 10.2.
 
Old 11-29-2005, 05:06 AM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
At a guess, maybe you're running a different vesion of MySQL than you had on your old box. I've come across problems importing .sql from different versions depending on how it was exported. If you're running phpmyadmin, whilst choosing to import there should an option to select the input version.
 
Old 11-29-2005, 01:45 PM   #3
shubb
Member
 
Registered: Oct 2003
Location: San Francisco
Distribution: Slackware 13.37
Posts: 150

Original Poster
Rep: Reputation: 16
Ok, I tried using phpMyAdmin, and it has the same problem. By the way, there is no option for selecting the input version.

It appears that it doesnt like the column name "option". When I try to import, the admin shows me the attempted import. It puts all the known MySQL commands in capital letters. It was having a problem with the "option" keyword being used as a column name. I changed it (and another invalid column name) and it imported ok. Now I just have to make sure it didnt break any of the php...

Thanks for the help!
 
Old 11-29-2005, 02:36 PM   #4
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
"option" sounds like a possible keyword. You probably could have quoted it to keep the column name the same.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem importing LDIF file into OpenLDAP database cboxall Linux - Newbie 1 06-17-2005 10:51 AM
How to back up mysql database? aroop Linux - Software 1 03-29-2005 10:11 AM
Mysql importing problem nepcw Linux - Newbie 4 03-22-2004 06:09 PM
MySQL: Importing a database from an XML file concoran General 0 09-08-2003 03:58 AM
Importing FreeBSD mysql database to RedHat Linux 7.3 RKris Linux - Software 6 05-06-2003 05:07 AM


All times are GMT -5. The time now is 04:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration