关于导入mysql数据库问题
时间:2011-07-11
来源:互联网
错误
SQL 查询:
CREATE TABLE zen_configuration(
configuration_id int( 11 ) NOT NULL AUTO_INCREMENT ,
configuration_title text NOT NULL ,
configuration_key varchar( 255 ) NOT NULL ,
configuration_value text NOT NULL ,
configuration_description text NOT NULL ,
configuration_group_id int( 11 ) NOT NULL ,
sort_order int( 5 ) ,
last_modified datetime,
date_added datetime DEFAULT '0001-01-01 00:00:00' NOT NULL ,
use_function text,
set_function text,
PRIMARY KEY ( configuration_id ) ,
KEY unq_config_key_zen( configuration_key ) ,
KEY idx_key_value_zen( configuration_key, configuration_value ) ,
KEY idx_cfg_grp_id_zen( configuration_group_id )
);
MySQL 返回:文档
#1170 - BLOB/TEXT column 'configuration_value' used in key specification without a key length
我重另外一台服务器 备份下来 utf8编码这些都没错 但是为什么我导入新的服务器里面就出现这样的情况 在线求解
SQL 查询:
CREATE TABLE zen_configuration(
configuration_id int( 11 ) NOT NULL AUTO_INCREMENT ,
configuration_title text NOT NULL ,
configuration_key varchar( 255 ) NOT NULL ,
configuration_value text NOT NULL ,
configuration_description text NOT NULL ,
configuration_group_id int( 11 ) NOT NULL ,
sort_order int( 5 ) ,
last_modified datetime,
date_added datetime DEFAULT '0001-01-01 00:00:00' NOT NULL ,
use_function text,
set_function text,
PRIMARY KEY ( configuration_id ) ,
KEY unq_config_key_zen( configuration_key ) ,
KEY idx_key_value_zen( configuration_key, configuration_value ) ,
KEY idx_cfg_grp_id_zen( configuration_group_id )
);
MySQL 返回:文档
#1170 - BLOB/TEXT column 'configuration_value' used in key specification without a key length
我重另外一台服务器 备份下来 utf8编码这些都没错 但是为什么我导入新的服务器里面就出现这样的情况 在线求解
作者: silly520 发布时间: 2011-07-11
mysql> CREATE TABLE zen_configuration(
-> configuration_id int( 11 ) NOT NULL AUTO_INCREMENT ,
-> configuration_title text NOT NULL ,
-> configuration_key varchar( 255 ) NOT NULL ,
-> configuration_value text NOT NULL ,
-> configuration_description text NOT NULL ,
-> configuration_group_id int( 11 ) NOT NULL ,
-> sort_order int( 5 ) ,
-> last_modified datetime,
-> date_added datetime DEFAULT '0001-01-01 00:00:00' NOT NULL ,
-> use_function text,
-> set_function text,
-> PRIMARY KEY ( configuration_id ) ,
-> KEY unq_config_key_zen( configuration_key ) ,
-> KEY idx_key_value_zen( configuration_key, configuration_value(100) ) ,
-> KEY idx_cfg_grp_id_zen( configuration_group_id )
-> );
Query OK, 0 rows affected (0.30 sec)
-> configuration_id int( 11 ) NOT NULL AUTO_INCREMENT ,
-> configuration_title text NOT NULL ,
-> configuration_key varchar( 255 ) NOT NULL ,
-> configuration_value text NOT NULL ,
-> configuration_description text NOT NULL ,
-> configuration_group_id int( 11 ) NOT NULL ,
-> sort_order int( 5 ) ,
-> last_modified datetime,
-> date_added datetime DEFAULT '0001-01-01 00:00:00' NOT NULL ,
-> use_function text,
-> set_function text,
-> PRIMARY KEY ( configuration_id ) ,
-> KEY unq_config_key_zen( configuration_key ) ,
-> KEY idx_key_value_zen( configuration_key, configuration_value(100) ) ,
-> KEY idx_cfg_grp_id_zen( configuration_group_id )
-> );
Query OK, 0 rows affected (0.30 sec)
作者: rucypli 发布时间: 2011-07-11
引用 1 楼 rucypli 的回复:
mysql> CREATE TABLE zen_configuration(
-> configuration_id int( 11 ) NOT NULL AUTO_INCREMENT ,
-> configuration_title text NOT NULL ,
-> configuration_key varchar( 255 ) NOT NULL ,
……
mysql> CREATE TABLE zen_configuration(
-> configuration_id int( 11 ) NOT NULL AUTO_INCREMENT ,
-> configuration_title text NOT NULL ,
-> configuration_key varchar( 255 ) NOT NULL ,
……
请问我怎么修改 我菜鸟
作者: silly520 发布时间: 2011-07-11
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28