带有 MySQL-8 数据库的 Liferay-7 不工作
Liferay-7 with MySQL-8 database not working
尝试使用 MySQL-8 数据库安装 Liferay-7 时,命令提示符卡在以下错误并且安装未完成
2018-07-06 12:41:15.163 INFO [main][ReleaseLocalServiceImpl:130] Create tables and populate with default data
2018-07-06 12:41:40.559 WARN [main][BaseDB:484] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'system tinyint,_ maxUsers integer,_ active_ tinyint_) engine InnoDB' at line 10: create table Company (_ mvccVersion bigint default 0 not null,_ companyId bigint not null primary key,_ accountId bigint,_ webId varchar(75) null,_ key_ longtext null,_ mx varchar(200) null,_ homeURL longtext null,_ logoId bigint,_ system tinyint,_ maxUsers integer,_ active_ tinyint_) engine InnoDB;_ [Sanitized]
正如 MySQL v8 中的 MySQL documentation on reserved words 所说:
SYSTEM (R) added in 8.0.3 (reserved)
因此,单词 system
是保留词,因此您需要用反引号将其括起来:
... `system` tinyint ...
MySQL 8.0 已经 released in April 2018, Liferay 7.0 has been released in April 2016。可以很好地猜测 Liferay 尚未在其首次发布后两年未发布的数据库上进行过测试。
您可以找到 compatibility matrix for the enterprise version here。它通常也是 CE 版本支持的基础设施的一个很好的指标(区别在于仅限于开源数据库和应用程序服务器)。本文档列出 MySQL 5.6、5.7 和 MariaDB 10 作为 Liferay DXP 7.0 支持的数据库,这是与 Liferay Portal 7.0 CE 平行的企业支持版本。
尝试使用 MySQL-8 数据库安装 Liferay-7 时,命令提示符卡在以下错误并且安装未完成
2018-07-06 12:41:15.163 INFO [main][ReleaseLocalServiceImpl:130] Create tables and populate with default data
2018-07-06 12:41:40.559 WARN [main][BaseDB:484] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'system tinyint,_ maxUsers integer,_ active_ tinyint_) engine InnoDB' at line 10: create table Company (_ mvccVersion bigint default 0 not null,_ companyId bigint not null primary key,_ accountId bigint,_ webId varchar(75) null,_ key_ longtext null,_ mx varchar(200) null,_ homeURL longtext null,_ logoId bigint,_ system tinyint,_ maxUsers integer,_ active_ tinyint_) engine InnoDB;_ [Sanitized]
正如 MySQL v8 中的 MySQL documentation on reserved words 所说:
SYSTEM (R) added in 8.0.3 (reserved)
因此,单词 system
是保留词,因此您需要用反引号将其括起来:
... `system` tinyint ...
MySQL 8.0 已经 released in April 2018, Liferay 7.0 has been released in April 2016。可以很好地猜测 Liferay 尚未在其首次发布后两年未发布的数据库上进行过测试。
您可以找到 compatibility matrix for the enterprise version here。它通常也是 CE 版本支持的基础设施的一个很好的指标(区别在于仅限于开源数据库和应用程序服务器)。本文档列出 MySQL 5.6、5.7 和 MariaDB 10 作为 Liferay DXP 7.0 支持的数据库,这是与 Liferay Portal 7.0 CE 平行的企业支持版本。