mysql建库时提示Specified key was too long max key length is_MySQL
程序员文章站
2022-04-16 18:12:56
...
bitsCN.com
mysql建库时提示Specified key was too long max key length is 1000 bytes的问题
索引字段长度太长,
网上搜到解决方法:
1.修改字段长度
2.修改mysql默认的存储引擎
在/etc/mysql/my.cnf 的[mysqld] 下面加入default-storage-engine=INNODB
但是在建库时已经明确表明了需要使用INNODB引擎
Sql代码
CREATE TABLE `acs` (
...
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
检查当前的引擎
mysql> show engines;
果然没有InnoDB
查看是否支持动态加载, 重要的是have_dynamic_loading这行,如果是YES,那么继续
mysql>show variables like "have_%";
安装插件
mysql> INSTALL PLUGIN INNODB SONAME 'ha_innodb.so';
mysql> show engines;
上一篇: 支付宝手机接口,服务端PHP验证失败
下一篇: ubuntu安装redisphp扩展
推荐阅读
-
MySQL错误“Specified key was too long; max key length is 100
-
MySQL错误“Specified key was too long; max key length is 100_MySQL
-
mysql建库时提示Specified key was too long max key length is_MySQL
-
MySQL:Specified key was too long; max key length is 767 bytes.
-
mysql建库时提示Specified key was too long max key length is_MySQL