Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-09-2009, 07:40 AM   #1
Registered: Jun 2007
Distribution: Ubuntu 14.04
Posts: 186

Rep: Reputation: 36
Unable to import MySQL dump

Hi guys,
I've got this big problem at work - nobody here is really a database expert at the moment. We are basically dumping stuff from this old server and are migrating data into the new one. I can't seem to be able to import the MySQL-server data that was previously dumped.

For dumping, I used the usual

mysqldump -u root -p --all-databases > dump.sql

After copying it over to the new server with scp, on the new server I tried to import it with.

mysql -u root -p < dump.sql

The import started and several databases got properly imported but at one point it failed on me and the import stopped with following error:

ERROR 1064 (42000) at line 246: 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 '/
/*!50003 CREATE TRIGGER `nyposttillftimalbeskrivning` AFTER INSERT ON `malbesk' at line 1
If I export all other databases that I need and import them seperately, it will work - only this one in particular is making me problems because of - well, whatever it means, the stated above in the error message.

The original server that the dump was created from is MySQL 5.0.13-rc-max. The import was intended for the most recent 5.1. I even went down to the latest 5.0.x version (.67) and try to import it from there - always same failure.

I would appreciate if you could guys help me out with the tips...
Thanks in advance...
Old 02-09-2009, 09:03 PM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,329

Rep: Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745Reputation: 2745
To start with I'd use vim or more to go through the broken file and pull out the complete 'create trigger...' statement.
Use a a separate file for each DB/schema, so it's not so big.
You can then post that here, but you might get a faster answer at the mysql forums
I also strongly recommend you bookmark this:


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
unable to import albums in digikam? mma8x Linux - Software 5 11-10-2009 06:08 PM
mysql dump mahmoud Linux - Server 7 02-27-2008 03:43 AM
Unable to import gtk module essdeeay Linux - General 1 01-13-2006 05:47 AM
Mysql with 10.2 dump barrythai Mandriva 2 04-11-2005 08:18 PM
How do I import a dump file into Aimsniff? MaldiGola Linux - Security 1 12-05-2004 04:31 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:45 AM.

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