I am running XAMPP version 1.7.7 which includes:
- Apache 2.2.21
- MySQL 5.5.16
- PHP 5.3.8
#2006 - MySQL server has gone away using XAMPP.The solution was to change MySQL configuration in my.ini file that can be found in xampp folder: xampp\mysql\bin.
Offending variable is called max_allowed_packet which by default is set to 1 MB.
As I was trying to import database larger than 1 MB I had to change the limit to something larger:
[mysqld]
port= 3306
socket= "D:/xampp/mysql/mysql.sock"
basedir="D:/xampp/mysql"
tmpdir="D:/xampp/tmp"
datadir="D:/xampp/mysql/data"
pid_file="mysql.pid"
skip-external-locking
key_buffer = 16M
max_allowed_packet = 10M
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
log_error="mysql_error.log"
#bind-address="127.0.0.1"
You have to restart MySQL for changes to take effect.
Brak komentarzy:
Prześlij komentarz