当尝试连接 mirthconnect 以使用 mariaDB 而不是 Derby 嵌入式数据库时,创建数据库时 mirth connect 失败。
使用:
- Ubuntu 18.04 LTS
- MariaDB 10.1.29-MariaDB-6
- 欢乐连接 3.6.0
- Java openjdk 10.0.1
设置步骤:
- 安装玛丽亚数据库
- 安装 Mirth 连接。
- 创建要与 Mirth 一起使用的数据库
- 在 Maria DB 中创建 mirth 用户
- 配置 mirth connect 以连接到 Maria DB
- 开始欢乐服务
http://www.hpctech.org/8-steps-to-install-mirthconnect-with-mysql-mariadb-on-linux/
启动 mirthconnect 服务时,会引发以下异常。
ERROR 2018-07-04 15:13:11,013 [Main Server Thread] com.mirth.connect.server.Mirth: Failed to migrate database schema
com.mirth.connect.model.util.MigrationException: Failed to execute script: /mysql/mysql-database.sql
at com.mirth.connect.server.migration.Migrator.executeScript(Migrator.java:103)
at com.mirth.connect.server.migration.Migrator.executeScript(Migrator.java:86)
at com.mirth.connect.server.migration.ServerMigrator.initDatabase(ServerMigrator.java:234)
at com.mirth.connect.server.migration.ServerMigrator.migrate(ServerMigrator.java:59)
at com.mirth.connect.server.controllers.DefaultMigrationController.migrate(DefaultMigrationController.java:91)
at com.mirth.connect.server.Mirth.startup(Mirth.java:226)
at com.mirth.connect.server.Mirth.run(Mirth.java:153)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
at com.mysql.jdbc.Util.getInstance(Util.java:383)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1062)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4208)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4140)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2597)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2758)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2820)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2769)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:907)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:791)
at com.mirth.connect.server.migration.Migrator.executeScript(Migrator.java:100)
... 6 more
已创建一半的数据库表
show tables;
+------------------------+
| Tables_in_mirthconnect |
+------------------------+
| CHANNEL |
| EVENT |
| PERSON |
| PERSON_PASSWORD |
| PERSON_PREFERENCE |
| SCHEMA_INFO |
| SCRIPT |
+------------------------+
谁能告诉我:
- 例外意味着什么?
- 如何解决错误?