Uploaded image for project: 'OpenMRS Standalone'
  1. OpenMRS Standalone
  2. STAND-91

Include mysql command line script

    XMLWordPrintable

Details

    • New Feature
    • Status: Ready for Work
    • Could
    • Resolution: Unresolved
    • None
    • 2.0
    • None
    • Low

    Description

      As per this comment, we should ship the OpenMRS Standalone with a mysql script for quick & easy access to the Standalone's embedded mysql client.

      1. Add &server.socket=/tmp/openmrs-standalone.sock* to the end of the connection.url in the runtime properties file.

      2. Include a "mysql" bash script in the standalone's main folder (might be able to create a .cmd equivalent for windows if there are grep & awk alternatives in Windoze):

      #!/bin/bash
      password=`cat openmrs-standalone-runtime.properties | grep connection.password | awk -F= '{print $2}'`
      database/bin/mysql -u openmrs --password="$password" --socket=/tmp/openmrs.sock --max_allowed_packet=96M
      

      3. Make sure the script is executable (chmod 755 mysql)

      Then users could easily enter the standalone's embedded mysql instance by simply typing

      $ ./mysql
      

      *Ideally, the standalone would generate a short instance-specific token to make the .sock file name unique (so multiple instances of the standalone could be run on the same machine without conflicting). At least including the standalone version number in the .sock file's name would allow running different versions of the standalone together without conflicting.

      Gliffy Diagrams

        Attachments

          Activity

            People

              Unassigned Unassigned
              burke Burke Mamlin
              TyReesh Boedhram TyReesh Boedhram
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 3 weeks Original Estimate - 3 weeks
                  3w
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 weeks, 1 day, 3 hours
                  4w 1d 3h