0

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

n92
  • 7,424
  • 27
  • 93
  • 129
  • Did you check this http://stackoverflow.com/questions/7942154/mysql-error-2006-mysql-server-has-gone-away and don't forget to restart your server after making changes to my.ini – Deepak Rai Mar 04 '14 at 12:23
  • let us know your server RAM and it will be help full if you share configuration file details specially innodb_buffer_pool_size and key_buffer_size...You can also check after changing max_allowed_packet = 64M. – Zafar Malik Mar 04 '14 at 12:35
  • @ZafarMalik, please see my edit and also i have given the link to my.ini file – n92 Mar 04 '14 at 12:44

1 Answers1

1

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.

Zafar Malik
  • 6,734
  • 2
  • 19
  • 30
  • Main problem seems memory allocated to max_allowed_packet in mysqldump section which is more than total memory... – Zafar Malik Mar 04 '14 at 13:20
  • It was not accepting innodb_buffer_pool_size = 1536M, then changed to innodb_buffer_pool_size = 1000M, its working fine now – n92 Mar 04 '14 at 14:26