1.修改數(shù)據(jù)庫配置:
vim /etc/my.cnf
在[mysqld]下面加入:
innodb_log_file_size = 2G
innodb_file_per_table = ON
max_allowed_packet = 512M
注意:
這里面設(shè)置的大小值是有一定比例的,不可以自己隨意設(shè)置數(shù)值,可參考官方文檔或安裝教程來設(shè)置,否則一定會報錯?。。?/p>
2.重啟數(shù)據(jù)庫
systemctl resatrt Mysqld
netstat -ntap |grep 3306
systemctl status MYSQLd
3.網(wǎng)頁驗證
參考官方文檔:
https://confluence.atlassian.com/confkb/exceeds-max-allowed-packet-for-mysql-179443425.html
更多關(guān)于云服務(wù)器,域名注冊,虛擬主機的問題,請訪問三五互聯(lián)官網(wǎng):m.shinetop.cn