Solved

mysqldump longtext - longblob

Posted on 2006-11-29
3
1,501 Views
Last Modified: 2008-01-09
I need to backup my datas in my table. There is longtext field with a huge data in it.

I used mysqldump command to backup my table, it didn't give me correct result. I have 1000 records approx., but i got only 3 of them insert value. Is there any parameter for it.

I heard about max_allowed_packets. If this will be the solution can you write the exact solution (no suggestions please!).

0
Comment
Question by:tolgaong
  • 2
3 Comments
 
LVL 35

Expert Comment

by:Raynard7
Comment Utility
The answer to this question involves what error that you are getting.

Generally speaking if mysql dump produces a sql file then you should be able to import it.  If it does not import there is generally an error at the statement it had problems with and will stop processing from that point.

If the error is that there was an SQL format error then you may need to edit the dump file, if the error was insufficient memory you would need to change the value for max_allowed_packets in the my.cnf / my.ini so something larger (it is in bytes)

0
 
LVL 9

Author Comment

by:tolgaong
Comment Utility
Remote Server - Linux - Mysql 5.0.16
Local Server  - XP Mysql 5

mysqldump --skip-opt --add-drop-table --add-locks --create-options  --order-by-primary  -uxxxxx -pxxxxxxx xxxxxx xxxxx_cities >c:\xxx.sql

When i wrote with these attributes it gives me the correct values, i don't know why. Now it gives me each insert with new line. And it's solved. maybe mysqldump not use general syntax... Cause i suffered some other problems... I will be glad, if you advice me the way for all operating systems to backup my data.

Thanks






0
 
LVL 35

Accepted Solution

by:
Raynard7 earned 500 total points
Comment Utility
This depends on what tables you are using.

I've had many more problems using mysqldump than just copying my myisam data files to other systems (cross linux / windows...) but I have not been able to get this to work with innodb.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now