Announcement

Collapse
No announcement yet.

Creating new mirthdb in same MySQL server doesn't create the mirth schema tables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating new mirthdb in same MySQL server doesn't create the mirth schema tables

    Hi.. We are using Mirth Connect 3.11.0 version and we connect to mySQL database for storing mirth related configurations and messages .

    When connecting MirthConnect (MC) to a MySQL server on a fresh database, Mirth creates standard tables automatically. This behavior though only works for the first mirth database created on a MySQL server. If a second database is created and a connection is attempted, MC server fails to start with the following error displayed on the server log:
    ERROR 2021-08-11 14:10:43,316 [Main Server Thread] com.mirth.connect.server.Mirth: Failed to migrate database schema
    com.mirth.connect.model.util.MigrationException: java.sql.SQLSyntaxErrorException: Table 'mirthdbaks.SCHEMA_INFO' doesn't exist

    To work around this limitation, after the additional DB is created, we can backup mirth tables from an existing database and restore them on the newly created database. Once the tables are restored, the error shown above no longer occurs and MirthConnect starts up on the new database without an issue.

    e.g. mysqldump -u mirth -p --routines --triggers mirthdb | mysql -u mirthaks -p -A -D mirthdbaks;

    Is there a better way to create a new database on the MYSQL server ?

  • #2
    I would be your mirth properties files is not correct between the 2 instances of mirth creating their own mirth db.
    Diridium Technologies, Inc.
    https://diridium.com

    Comment


    • #3
      We use AKS environment variables to specify the mirthdb and other parameters .

      Comment


      • #4
        I am just saying in the hundreds of times I have installed mirth it has never failed to create the database if mirth.properties was configured correctly and the database was created with tthe db user having full permissions on the created db.
        Diridium Technologies, Inc.
        https://diridium.com

        Comment


        • #5
          I've been running into this all afternoon trying to update from mirth 3.6.1 to 3.12.0 while keeping the old database alongside. As soon as I dropped the old database everything was fine! Very interesting bug.

          Comment

          Working...
          X