ERROR 2006(HY000)第2759行:MySQL服务器已经消失

时间:2017-07-16 18:25:16

标签: mysql database memory import

我正在尝试使用cmd中的此命令将sql文件导入我的数据库:

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

是的,我以前谷歌它,所有现有的文档,为什么会发生这种情况,并没有任何帮助我。它说

  

ERROR 2006(HY000)第2759行:MySQL服务器已经消失

我的档案:

  

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 

我要导入的文件是1.4GB。

1 个答案:

答案 0 :(得分:1)

您的设备不太可能在.ini中支持此请求 - max_allowed_pa​​cket的= 99999999M

那将是大约99,999,999,000,000字节的内存。 99太字节?

将它减少到100M,让我们知道这是否适合你。