n92
n92

Reputation: 7592

How to resolve error "#2006 - MySQL server has gone away"

I have MySQL Community Server 5.6.16 running, I have a mysql dump file of size 290MB,

and I have the following my.ini settings

innodb_lock_wait_timeout = 60000000
max_allowed_packet = 8000000000M

When i try to restore the database from the dump file, I get error below

#2006 - MySQL server has gone away 

How to resolve this error.

  RAM Size: 3.00 GB

    my.ini 
    ----------------
    key_buffer = 16M
    max_allowed_packet = 1M
    sort_buffer_size = 512K
    net_buffer_length = 8K
    read_buffer_size = 256K
    read_rnd_buffer_size = 512K
    myisam_sort_buffer_size = 8M


    innodb_buffer_pool_size = 16M
    innodb_additional_mem_pool_size = 2M
    ## Set .._log_file_size to 25 % of buffer pool size
    innodb_log_file_size = 5M
    innodb_log_buffer_size = 8M
    innodb_flush_log_at_trx_commit = 1
    innodb_lock_wait_timeout = 60000000

my.ini file download link

Upvotes: 0

Views: 610

Answers (1)

Zafar Malik
Zafar Malik

Reputation: 6844

Change as per below:

max_allowed_packet = 64M
innodb_buffer_pool_size = 1536M

Also add below lines same as given at the end of your ini file.

[mysqldump]
quick     ##it is already there in your file.
max_allowed_packet = 80000M # change it to 64M as this is more than your total memory.

After these changes restart mysql and check now.

If still getting error then share todays error logs from your error log file.

Upvotes: 1

Related Questions