LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-17-2010, 01:12 AM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 489

Rep: Reputation: 36
error at restoring dumped sql


error at restoring dumped sql


I have backuped sql by mysqldump on mysql version 5.1.41.
But when I restore this sql by command "mysql -uroot --default-character-set=utf8" my-db < my-sql.sql" I've got this error message.

Quote:
#1064 - 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 'barunarum',1,1,1,1,1,1,1,1,1,1,3,3,-1,5,1,-20,0,'','script|iframe',0,0,0,0,0,0,0' at line 1
What is this error and how to solve?

Thanks in advance.
 
Old 08-17-2010, 06:54 AM   #2
dr_agon
Member
 
Registered: Sep 2007
Location: Poland
Distribution: Ubuntu LTS
Posts: 105
Blog Entries: 12

Rep: Reputation: 26
Probably your my-sql.sql file schould contain proper SQL statements, and looks like it contains only comma-separated data.
Check it, and post a few lines of this file.

I don't use mysql, but it is worth checking if the command for restoring db matches the command used for backing it up (regarding the format of saved data).
 
Old 08-17-2010, 09:31 AM   #3
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
After changing option at phpmyadmin - that is to select 'mysql40' at sql compatibility mode, the error message changed.

Quote:
SQL query:

INSERT INTO `g4_visit` VALUES (272246,'66.249.68.167','2009-08-14','00:00:16','','Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'),(2...39;Mozilla/5.0 (Twiceler-0.9 http://www.cuil.com/twiceler/robot.h...39;Mozilla/5.0 (Twiceler-0.9 http://www.cuil.com/twiceler/robot.h...39;Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearc...39;EMPAS.ROBOT (compatible; MSIE 5.01; Windows NT 5.0)'),(272251,'66.249.68.195','2009-08-14','00:13:54','','Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'),(2...N','Mo[...]

MySQL said: Documentation
#1064 - 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 'Mozilla/4.0 (compatible' at line 1
 
Old 08-17-2010, 03:49 PM   #4
dr_agon
Member
 
Registered: Sep 2007
Location: Poland
Distribution: Ubuntu LTS
Posts: 105
Blog Entries: 12

Rep: Reputation: 26
The error number did not change. Just believe what it says - there is a syntax error.

Have you checked the delimiters and quoting in the SQL statement?
Can you execute this statement when entered manually (not from the file)?

PS. Wrap code segments in [CODE], not [QUOTE] marks, and post the whole statement correctly.
 
Old 08-18-2010, 01:48 AM   #5
windstory
Member
 
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36
dr_argon/ The error message is here;

Code:
SQL query:

INSERT INTO `g4_visit` VALUES (272246,'66.249.68.167','2009-08-14','00:00:16','','Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'),(2...39;Mozilla/5.0 (Twiceler-0.9 http://www.cuil.com/twiceler/robot.h...39;Mozilla/5.0 (Twiceler-0.9 http://www.cuil.com/twiceler/robot.h...39;Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearc...39;EMPAS.ROBOT (compatible; MSIE 5.01; Windows NT 5.0)'),(272251,'66.249.68.195','2009-08-14','00:13:54','','Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'),(2...N','Mo[...]

MySQL said: Documentation
#1064 - 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 'Mozilla/4.0 (compatible' at line 1
Please take a look at this link.
http://rapidshare.com/files/413618750/ERROR.7z

Last edited by windstory; 08-18-2010 at 01:52 AM.
 
  


Reply



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
segmentation error (core dumped) Linux in c nasim751 Programming 1 01-29-2008 02:40 PM
segmentation error (core dumped) Linux in c nasim751 Programming 1 01-27-2008 05:12 PM
segmentation error (core dumped) Linux in c nasim751 Programming 2 01-27-2008 05:06 PM
Restoring *.sql database from Linux Fedora's shell marciano Linux - Newbie 1 10-19-2005 06:05 PM
Segementation Fault Error (Core Dumped) ??? Mistro116@yahoo.com Programming 8 10-17-2005 11:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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
Open Source Consulting | Domain Registration