Get the App
SLTechnology News&Howtos  ›  Servers  › 

The solution to phpcms's inability to add columns

Shulou Source: shulou.com Published: 2022-06-02 04:48:55 11月16日 Update

Editor to share with you the solution that phpcms can not add columns. I hope you will gain a lot after reading this article. Let's discuss it together.

What if phpcms cannot add columns?

Solve the error of adding column to PHPCMS

MYSQL error: Got a packet bigger than 'max_allowed_packet' bytes

This exception is sometimes thrown when performing data entry using the longtext type

Literally, the operation cannot be performed if the current package size exceeds the mysql system setting.

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

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

Solution:

(1) under Linux:

Go to the server path / etc and find my.cnf in the mysqld section inside.

Find max_allowed_packet = size

Change it to the appropriate size and save it, and then restart the mysql server. If you don't have this line, add it.

(2) under Windows:

Go to the mysql installation path, find the my.ini file, and add a sentence in the [mysqld] section (not available in this section):

Set-variable=max_allowed_packet= size. Restart the mysql service after saving.

By the way: that size setting can directly write 10m, 20000K and so on under linux.

But under windows, it can only be converted to byte.

After reading this article, I believe you have a certain understanding of the solution that phpcms can not add columns. If you want to know more about it, welcome to follow the industry information channel. Thank you for reading!

Tags: Size column service method that is server article statement path restriction appropriate thing method literal done how to do data data entry file Times Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux MySQL Shulou Tech Info macOS Shulou Technology