mysql 5.5 Index column size too large. The maximum column size is 767 bytes 解决

执行 

set global innodb_large_prefix='on';
set global innodb_file_format='Barracuda';
set global innodb_file_per_table ='on'

然后

脚本加上 红色部分

-- 导出 表 identityserver.apiresources 结构
DROP TABLE IF EXISTS `apiresources`;
CREATE TABLE IF NOT EXISTS `apiresources` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`Enabled` tinyint(1) NOT NULL,
`Name` varchar(200) NOT NULL,
`DisplayName` varchar(200) DEFAULT NULL,
`Description` varchar(1000) DEFAULT NULL,
`AllowedAccessTokenSigningAlgorithms` varchar(100) DEFAULT NULL,
`ShowInDiscoveryDocument` tinyint(1) NOT NULL,
`Created` datetime(6) NOT NULL,
`Updated` datetime(6) DEFAULT NULL,
`LastAccessed` datetime(6) DEFAULT NULL,
`NonEditable` tinyint(1) NOT NULL,
PRIMARY KEY (`Id`),
UNIQUE KEY `IX_ApiResources_Name` (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4 ROW_FORMAT=DYNAMIC;

 

posted @ 2021-12-13 11:28  学亮  阅读(531)  评论(0编辑  收藏  举报