Jump to content

max_allowed_packet, HELP HELP!


Chirantha

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
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.