更新时间:2022-11-12 17:22:18
我在Windows上使用XAMPP,但遇到了同样的问题.
我以为这是超时变量,但它是max_allowed_packet
.
I'm using XAMPP on Windows and had the same problem.
I thought it was the timeout variable but it was max_allowed_packet
.
此问题已解决:
# note the change was made at this section
[mysqld]
port= 3306
socket= "/xampp/mysql/mysql.sock"
basedir="/xampp/mysql"
tmpdir="/xampp/tmp"
datadir="/xampp/mysql/data"
skip-locking
key_buffer = 16M
# it was 1M by default
max_allowed_packet = 2M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
此配置文件位于«XAMPP安装目录,默认为 C:\XAMPP
» \mysql\bin\my.ini
.
This configuration file is located at «XAMPP install directory, this is C:\XAMPP
by default»\mysql\bin\my.ini
.