Home > CMS Tutorial > PHPCMS > What should I do if phpcms cannot add a column?

What should I do if phpcms cannot add a column?

藏色散人
Release: 2019-12-26 11:05:05
Original
2493 people have browsed it

What should I do if phpcms cannot add a column?

What should I do if phpcms cannot add a column?

Solution to PHPCMS error when adding a column

MYSQL error: Got a packet bigger than ‘max_allowed_packet’ bytes
Copy after login

When using longtext type to perform data entry, this exception will sometimes be thrown,

The literal understanding is that the current package size exceeds the package size set by the mysql system and the operation cannot be performed.

Explain the package size: simply put, mysql regards the currently executed mysql statement as a package,

The limit on the size of this package is the length of the current mysql statement limits.

Solution:

(1) Under Linux:

Enter the server path/etc and find my.cnf. In the mysqld section inside,

find max_allowed_packet = Size

Modify to the appropriate size and save, then restart the mysql server. If this line does not exist, add this line.

(2) Under Windows:

Enter the mysql installation path, find the my.ini file, and add a sentence in the [mysqld] section (it is useless if it is not in this section):

set-variable=max_allowed_packet=size. After saving, restart the mysql service.

By the way: The size setting can be written directly to 10M, 20000K or the like under Linux

But under Windows it can only be converted into byte.

PHP Chinese website, a large number of free PHPCMS tutorials, welcome to learn online!

The above is the detailed content of What should I do if phpcms cannot add a column?. For more information, please follow other related articles on the PHP Chinese website!

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