An error occurred while inserting big data. max_allowed_packet

Source: Internet
Author: User
An error occurred while inserting big data max_allowed_packet. An error occurred while inserting more than 2000 data records online. then, I modified my settings. ini, max_allowed_packet = 200 M is added in it, and OK is inserted again, but I cannot modify this on the server on the virtual host I use, so is there a way to insert max_allowed_packet, online, and so on when PHP inserts big data?
Today I encountered a problem. when I inserted more than 2000 data records, an error was prompted. then I modified my. ini, added max_allowed_packet = 200 M to it, and inserted OK again.
But I can't modify this on the server on the virtual host I use, so is there a way to modify the corresponding settings in PHP to achieve this effect?

------ Solution --------------------
Exec ('set max_allowed_packet = 200m ')
------ Solution --------------------
Is mysql settings,
I think you can only discuss with the host

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.