Chirantha Posted April 9, 2006 Share Posted April 9, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/6969-max_allowed_packet-help-help/ Share on other sites More sharing options...
jworisek Posted April 10, 2006 Share Posted April 10, 2006 well, you can try modifying the mysql configuration file and changing the value tomax_allowed_packet = 350MWhy are you storing documents that big and are you sure your column type can support that? Quote Link to comment https://forums.phpfreaks.com/topic/6969-max_allowed_packet-help-help/#findComment-25501 Share on other sites More sharing options...
fenway Posted April 10, 2006 Share Posted April 10, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/6969-max_allowed_packet-help-help/#findComment-25517 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.