【发布时间】:2017-12-21 06:27:24
【问题描述】:
我正在尝试使用 cmd 中的此命令将 sql 文件导入我的数据库:
mysql -u root -p social-media-db < socialmediaexaminer_dev_2017-07-15T18-41-51_UTC_database.sql
是的,我之前用谷歌搜索过,阅读了所有现有文档,为什么会发生这种情况,但没有任何帮助。它说
ERROR 2006 (HY000) at line 2759: MySQL server has gone away
我的文件:
我的默认.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。
【问题讨论】:
标签: mysql database memory import