在 Windows 中无法将 MySQL 与 Liferay 连接
Cannot connect MySQL with Liferay in Windows
我使用 create database dblife character set utf8
创建了 MySQL 数据库。我使用 MySQL 版本 8.0.11
和 MySQL-连接器版本 5.1.4
。下载 MySQL-connector 后,我将 .jar
文件替换为 lib/ext
目录中的 Mysql.jar
。所以,当我 运行 Liferay 服务器版本 6.2
时,它给我以下错误,如下所示。
我进入 eclipse 控制台时出错:
09:51:13,420 INFO [localhost-startStop-1][DialectDetector:71] Determine dialect for MySQL 8
09:51:13,445 INFO [localhost-startStop-1][DialectDetector:136] Found dialect org.hibernate.dialect.MySQLDialect
09:40:37,209 INFO [http-bio-8080-exec-2][StartupAction:97] There are no patches installed
09:40:37,216 ERROR [http-bio-8080-exec-2][JDBCExceptionReporter:82] Table 'dblife.lock_' doesn't exist
09:40:37,221 WARN [http-bio-8080-exec-2][StartupAction:147] Unable to clear locks because Lock table does not exist
09:40:37,223 WARN [http-bio-8080-exec-2][ReleaseLocalServiceImpl:171] Table 'dblife.release_' doesn't exist
09:40:37,226 INFO [http-bio-8080-exec-2][ReleaseLocalServiceImpl:84] Create tables and populate with default data
09:40:38,058 WARN [http-bio-8080-exec-2][BaseDB:457] 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 1: create table Company ( companyId bigint not null primary key, accountId bigint, webId varchar(75) null, key_ longtext null, mx varchar(75) null, homeURL longtext null, logoId bigint, system tinyint, maxUsers integer, active_ tinyint) engine InnoDB;_ [Sanitized]
09:40:47,056 WARN [http-bio-8080-exec-2][BaseDB:457] Table 'dblife.company' doesn't exist: create index IX_38EFE3FD on Company (logoId);_ [Sanitized]
09:40:47,058 WARN [http-bio-8080-exec-2][BaseDB:457] Table 'dblife.company' doesn't exist: create index IX_12566EC2 on Company (mx);_ [Sanitized]
09:40:47,059 WARN [http-bio-8080-exec-2][BaseDB:457] 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)' at line 1: create index IX_35E3E7C6 on Company (system);_ [Sanitized]
09:40:47,060 WARN [http-bio-8080-exec-2][BaseDB:457] Table 'dblife.company' doesn't exist: create unique index IX_EC00543C on Company (webId);_ [Sanitized]
09:40:58,636 WARN [http-bio-8080-exec-2][BaseDB:457] Specified key was too long; max key length is 3072 bytes: create index IX_7020130F on SCProductVersion (directDownloadURL);_ [Sanitized]
09:40:58,637 ERROR [http-bio-8080-exec-2][BaseDB:464] create index IX_7020130F on SCProductVersion (directDownloadURL);
09:41:01,417 WARN [http-bio-8080-exec-2][BaseDB:457] Specified key was too long; max key length is 3072 bytes: create index IX_89509087 on User_ (companyId, openId);_ [Sanitized]
09:41:01,418 ERROR [http-bio-8080-exec-2][BaseDB:464] create index IX_89509087 on User_ (companyId, openId);
09:41:03,401 INFO [http-bio-8080-exec-2][BaseDB:484] Database does not support case sensitive queries
09:41:04,169 INFO [http-bio-8080-exec-2][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyProcessSuite
09:41:04,170 INFO [http-bio-8080-exec-2][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyProperties
09:41:04,195 ERROR [http-bio-8080-exec-2][DBUpgrader:247] Unable to execute verify process: com.liferay.portal.verify.VerifyException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dblife.company' doesn't exist
com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dblife.company' doesn't exist
Caused by: com.liferay.portal.verify.VerifyException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dblife.company' doesn't exist
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dblife.company' doesn't exist
此外,我无法在 liferay.home
目录中添加 portal-ext.properties
。当我添加此 portal-ext.properties
文件时,出现错误:Liferay v6.2(tomcat7
在本地主机遇到问题。
我检查了现有的解决方案 liferay-not-working-with-mysql,但我在控制面板> 管理工具
中看不到 Database Migration
选项
谁能给我建议解决方案。我会非常感谢你的。
安装 Liferay 时,需要对数据库具有 CREATE TABLE 和其他 DDL 权限。确保将这些授予您 运行 Liferay 作为的用户。您可以撤销它们,一旦表被创建 - 安装后 Liferay 只需要标准的 CRUD 操作(直到您升级或部署需要此类权限的新组件)。
此外,Liferay 6.2 比 mysql 8 早几年 - 可以安全地假设两者从未一起测试过,我建议使用已经过测试的数据库,而不是而不是尝试做以前没有人尝试过的工作。您将在 compatibility matrix.
中找到企业支持的版本
我使用 create database dblife character set utf8
创建了 MySQL 数据库。我使用 MySQL 版本 8.0.11
和 MySQL-连接器版本 5.1.4
。下载 MySQL-connector 后,我将 .jar
文件替换为 lib/ext
目录中的 Mysql.jar
。所以,当我 运行 Liferay 服务器版本 6.2
时,它给我以下错误,如下所示。
我进入 eclipse 控制台时出错:
09:51:13,420 INFO [localhost-startStop-1][DialectDetector:71] Determine dialect for MySQL 8
09:51:13,445 INFO [localhost-startStop-1][DialectDetector:136] Found dialect org.hibernate.dialect.MySQLDialect
09:40:37,209 INFO [http-bio-8080-exec-2][StartupAction:97] There are no patches installed
09:40:37,216 ERROR [http-bio-8080-exec-2][JDBCExceptionReporter:82] Table 'dblife.lock_' doesn't exist
09:40:37,221 WARN [http-bio-8080-exec-2][StartupAction:147] Unable to clear locks because Lock table does not exist
09:40:37,223 WARN [http-bio-8080-exec-2][ReleaseLocalServiceImpl:171] Table 'dblife.release_' doesn't exist
09:40:37,226 INFO [http-bio-8080-exec-2][ReleaseLocalServiceImpl:84] Create tables and populate with default data
09:40:38,058 WARN [http-bio-8080-exec-2][BaseDB:457] 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 1: create table Company ( companyId bigint not null primary key, accountId bigint, webId varchar(75) null, key_ longtext null, mx varchar(75) null, homeURL longtext null, logoId bigint, system tinyint, maxUsers integer, active_ tinyint) engine InnoDB;_ [Sanitized]
09:40:47,056 WARN [http-bio-8080-exec-2][BaseDB:457] Table 'dblife.company' doesn't exist: create index IX_38EFE3FD on Company (logoId);_ [Sanitized]
09:40:47,058 WARN [http-bio-8080-exec-2][BaseDB:457] Table 'dblife.company' doesn't exist: create index IX_12566EC2 on Company (mx);_ [Sanitized]
09:40:47,059 WARN [http-bio-8080-exec-2][BaseDB:457] 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)' at line 1: create index IX_35E3E7C6 on Company (system);_ [Sanitized]
09:40:47,060 WARN [http-bio-8080-exec-2][BaseDB:457] Table 'dblife.company' doesn't exist: create unique index IX_EC00543C on Company (webId);_ [Sanitized]
09:40:58,636 WARN [http-bio-8080-exec-2][BaseDB:457] Specified key was too long; max key length is 3072 bytes: create index IX_7020130F on SCProductVersion (directDownloadURL);_ [Sanitized]
09:40:58,637 ERROR [http-bio-8080-exec-2][BaseDB:464] create index IX_7020130F on SCProductVersion (directDownloadURL);
09:41:01,417 WARN [http-bio-8080-exec-2][BaseDB:457] Specified key was too long; max key length is 3072 bytes: create index IX_89509087 on User_ (companyId, openId);_ [Sanitized]
09:41:01,418 ERROR [http-bio-8080-exec-2][BaseDB:464] create index IX_89509087 on User_ (companyId, openId);
09:41:03,401 INFO [http-bio-8080-exec-2][BaseDB:484] Database does not support case sensitive queries
09:41:04,169 INFO [http-bio-8080-exec-2][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyProcessSuite
09:41:04,170 INFO [http-bio-8080-exec-2][VerifyProcess:65] Verifying com.liferay.portal.verify.VerifyProperties
09:41:04,195 ERROR [http-bio-8080-exec-2][DBUpgrader:247] Unable to execute verify process: com.liferay.portal.verify.VerifyException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dblife.company' doesn't exist
com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dblife.company' doesn't exist
Caused by: com.liferay.portal.verify.VerifyException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dblife.company' doesn't exist
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'dblife.company' doesn't exist
此外,我无法在 liferay.home
目录中添加 portal-ext.properties
。当我添加此 portal-ext.properties
文件时,出现错误:Liferay v6.2(tomcat7
在本地主机遇到问题。
我检查了现有的解决方案 liferay-not-working-with-mysql,但我在控制面板> 管理工具
中看不到Database Migration
选项
谁能给我建议解决方案。我会非常感谢你的。
安装 Liferay 时,需要对数据库具有 CREATE TABLE 和其他 DDL 权限。确保将这些授予您 运行 Liferay 作为的用户。您可以撤销它们,一旦表被创建 - 安装后 Liferay 只需要标准的 CRUD 操作(直到您升级或部署需要此类权限的新组件)。
此外,Liferay 6.2 比 mysql 8 早几年 - 可以安全地假设两者从未一起测试过,我建议使用已经过测试的数据库,而不是而不是尝试做以前没有人尝试过的工作。您将在 compatibility matrix.
中找到企业支持的版本