Details
-
New Feature
-
Status: Ready for Work
-
Could
-
Resolution: Unresolved
-
None
-
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.