Link to home
Start Free TrialLog in
Avatar of tolgaong
tolgaongFlag for Türkiye

asked on

mysqldump longtext - longblob

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!).

Avatar of Raynard7
Raynard7

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)

Avatar of tolgaong

ASKER

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






ASKER CERTIFIED SOLUTION
Avatar of Raynard7
Raynard7

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial