Announcement

Collapse
No announcement yet.

moving from derby to mysql

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

  • moving from derby to mysql

    I have tested Mirth using derby, but have not succeeded in moving to my mysql database after creating mirthdb, creating a user for it and initializing it with mysql-database.sql. Here are the steps I went through:

    1. modified mirth properties with "database=mysql"
    2. modified mysql-SqlMapConfig.properties with the username and password
    3. restarted the mirth server with ./mirth-daemon restsrt
    4. tested the database with a separate program
    5. fired it up with the big green button as before

    But I'm still getting the "problem authenticating" error with admin/admin. I initially had problems with the default ports, so I changed them. Is there a need to change the ports for jmx (1099) or mysql (3306)?

    Any help would be appreciated.

  • #2
    Re:moving from derby to mysql

    You missed one step, you need to run the database import/build script. Should be a file called mysql-database.sql.
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment


    • #3
      Re:moving from derby to mysql

      I went through this process and it was straight forward except taht in the script I had to change the data base name from MIRTHDB to mirthdb, ie, change the case.

      Comment


      • #4
        Re:moving from derby to mysql

        I actually did do that step. The only hiccup was the two statements:

        ALTER TABLE MESSAGE DROP FOREIGN KEY CHANNEL_ID_FK;

        ALTER TABLE CHANNEL_STATISTICS DROP FOREIGN KEY CHANNEL_STATS_ID_FK;

        Those come in the script before the tables are created, so I got errors and then left them out when I initialized the database. How can you alter a table before you create it and why are those statements there?

        Comment


        • #5
          Re:moving from derby to mysql

          Run the script ignoring all errors. Those are there for simplifying "re-creating" the database.
          Jacob Brauer
          Director, Software Development
          NextGen Healthcare

          sigpic

          Comment


          • #6
            Re:moving from derby to mysql

            The answer to my dilemma was "none of the above". In order to help
            those trying to navigate these waters:

            1. Pay attention to the LINUX-README.txt, particlularly this line:

            Note that you must have permission to write to the /opt directory. Mirth must be run by a user with the same permission as the one who installed it, otherwise you will have to run the following command:

            chown [owner]:[group] /opt/Mirth -R

            2. In the mysql-SqlMapConfig.properties file I had blanks following my username (that I obviously could not see) and which provided the wrong credentials.

            I'd still like to know the difference between ./mirth-daemon restart and ./mirth.sh for starting the Mirth service. The latter gives me some useful errors and warnings.

            Finally, I seem to still get the same authorization failure error message the first time I enter admin/admin, but the second time I get in. The log Information provided has the following:

            [2008-11-05 08:10:55,063] WARN (org.mortbay.jetty.context./:589): /users:
            com.webreach.mirth.server.controllers.ControllerEx ception: com.ibatis.common.jdbc.exception.NestedSQLExceptio n:
            --- The error occurred in mysql/mysql-user.xml.
            --- The error occurred while executing query.
            --- Check the

            SELECT USERNAME, PASSWORD, SALT

            FROM PERSON

            WHERE USERNAME = ?
            .
            --- Check the SQL Statement (preparation failed).
            --- Cause: java.sql.SQLException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:


            ** BEGIN NESTED EXCEPTION **

            com.mysql.jdbc.CommunicationsException
            MESSAGE: Communications link failure due to underlying exception:

            ** BEGIN NESTED EXCEPTION **

            java.io.EOFException

            STACKTRACE:
            ...

            What's this all about?

            Comment


            • #7
              Re:moving from derby to mysql

              I don't know why are you getting this errors.. Is it solved or they keeps annoying you? BTW What Mirth veriĆ³n are you using?

              The difference between mirth.sh and mirth-daemon is than mirht is a console command and you can read the output in the console. mirh-daemon lauch mirth in the background, so you need to go to the log dir to see the output (wrapper.log)

              Comment


              • #8
                Re:moving from derby to mysql

                Thanks. I'm running Mirth 1.7.1 on Linux with Plesk.

                I'm not concerned (yet) by these errors, but they seem to be coming up regularly on the dashboard every 2 hours. I got a popup saying that they were "unexpected" and inviting me to submit it to the Mirth project (which I did).

                N.

                Comment


                • #9
                  Re:moving from derby to mysql

                  Well now it does seem to be causing operational problems. When I try to edit the admin user, the data never makes it to the database. Here's the initial part of one of the warnings:

                  [2008-11-06 13:53:00,667] WARN (org.mortbay.jetty.context./:589): /users:
                  com.webreach.mirth.server.controllers.ControllerEx ception: com.ibatis.common.jdbc.exception.NestedSQLExceptio n:
                  --- The error occurred in mysql/mysql-user.xml.
                  --- The error occurred while executing query.
                  --- Check the

                  SELECT ID, USERNAME, FULLNAME, EMAIL, PHONENUMBER, LAST_LOGIN, DESCRIPTION

                  FROM PERSON

                  --- Check the SQL Statement (preparation failed).
                  --- Cause: java.sql.SQLException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:


                  ** BEGIN NESTED EXCEPTION **

                  com.mysql.jdbc.CommunicationsException
                  MESSAGE: Communications link failure due to underlying exception:

                  ** BEGIN NESTED EXCEPTION **

                  java.io.EOFException

                  STACKTRACE:

                  Comment

                  Working...
                  X