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;

原文地址:https://www.cnblogs.com/yxlblogs/p/15682492.html