Home >Database >Mysql Tutorial >mysql导入大的sql脚本_MySQL

mysql导入大的sql脚本_MySQL

WBOY
WBOYOriginal
2016-06-01 13:47:221053browse

bitsCN.com

1.首先 mysql导入sql文件:source data.sql

2.更改了mysql的my.ini的max_allowed_packet

mysql > use databasename
Database changed
mysql > source c:mysql.sql


如果.sql文件过大,mysql会直接断开连接


解决方法:

在mysql的配置文件my.ini 中加入 一行max_allowed_packet = 100M(该大小>=mysql.sql文件大小)


3.还遇到了一个问题就是"BLOB/TEXT column source used in key specification without a key length"


通过http://drupal.org/node/146296解决

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn