0

I'm trying to import sql file into my database with this command in cmd:

mysql -u  root -p social-media-db < socialmediaexaminer_dev_2017-07-15T18-41-51_UTC_database.sql

And yes i've google it before, readed all of the existing documentation why this happens and nothing helps me. It said

ERROR 2006 (HY000) at line 2759: MySQL server has gone away

My file:

my-default.ini

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

[mysqld]
max_allowed_packet=99999999M
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....


# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

The file i'm trying to import is 1.4GB.

Rumen Panchev
  • 468
  • 11
  • 26
  • Check this https://stackoverflow.com/questions/13717277/how-can-i-import-a-large-14-gb-mysql-dump-file-into-a-new-mysql-database – MikeSouto Jul 16 '17 at 18:49

1 Answers1

1

It is unlikely your equipment can support this request in your .ini --

max_allowed_packet=99999999M

That would be about 99,999,999,000,000 bytes of memory. 99 Terabytes?

Reduce it to something like 100M and let us know if this works for you.

H Aßdøµ
  • 2,925
  • 4
  • 26
  • 37
Wilson Hauck
  • 2,094
  • 1
  • 11
  • 19