Home > Backend Development > PHP Tutorial > 插入大数据时出错max_allowed_packet

插入大数据时出错max_allowed_packet

WBOY
Release: 2016-06-13 13:10:03
Original
933 people have browsed it

插入大数据时出错max_allowed_packet,在线等
今天遇到个问题,插入2000多条数据时提示错误,然后修改了my.ini,在里面添加了max_allowed_packet = 200M,再次插入OK了
但是我用的虚拟主机我没法修改服务器上的这个,所以有没有办法在PHP里面修改相应的设置,达到这个效果呢?

------解决方案--------------------
exec('set max_allowed_packet = 200M')
------解决方案--------------------
是mysql的设置, 
我觉得你只能和主机商谈

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template