Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem loading a MySQL backup

Status
Not open for further replies.

theom

Programmer
Feb 22, 2001
28
0
0
NL
Hi,

I have a problem loading a MySQL backup from one system into another system. On system A I give the following command:

mysqldump -pxxxxxx Joomla > joomla_backup.sql

On system B I have created a database Joomla and I give the following command:

mysql -pxxxxxx Joomla < joomla_backup.sql

This results in the following error:
ERROR 1064 (42000) at line 134: 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


Checking the database learns that 3 tables have been created and loaded correctly. The fourth table gives this error.
Checking the syntax learns that there is nothing wrong with the backup file. Syntax:

CREATE TABLE jos_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;



Deleting the info for 2 or 3 tables at the beginning of the backup file doesn't solve the problem, the same error applies but now at another location in the file.

System A is running RedHat 9 with MySQL version 4.0.13
System B is running X/OS 4 with MySQL version 4.1.12

There are 7 database which are running on system A. 6 can be migrated to system B without problems, it is the seventh that gives problems.

It seems to me that there is a memory problem during loading. Is this a setting in MySQL? Or in Linux? Can there be another problem?

Thanks in advance for helping,
Theo M.
 
option" is a keyword in 4.1 and 4.0, so I don't really know how that definition worked before. Try putting it in quotes.
 
Hi lgarner,

That's indeed the case! I run the export again with mysqldump's --quote-names option and that did the trick.
Thanks a lot!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top