Jump to content

Archived

This topic is now archived and is closed to further replies.

Chirantha

max_allowed_packet, HELP HELP!

Recommended Posts

Hi,

I was learning MySQL, And what! I made a program with it. But the problem is that when ever I put a BIG document (246MB) mysql returns max_allowed_packet exceed error :( . Is it possible to get MySQL to write part by part? and Read Part by Part?

Please Give an example code.

Thank you,
Chirantha

Share this post


Link to post
Share on other sites
well, you can try modifying the mysql configuration file and changing the value to

max_allowed_packet = 350M

Why are you storing documents that big and are you sure your column type can support that?

Share this post


Link to post
Share on other sites
Please tell me you're not serious. Don't even dream about doing that. There's a reason that max_packet_size exists, and you shouldn't tinker with it. Besides, I doubt that PHP can even handle such a large value with any reasonable speed, and you're unlikely to serve such a document to anyone, anywhere, except maybe locally. But I digress... in general, you should break up large files of typical size (MBs) across multiple records, and then simply stream them out one after the other.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.