Unable to run mysql on Standalone version

[MysqldResource] launching mysqld (driver_launched_mysqld_1) 210521 4:18:27 [ERROR] Fatal error: Please read “Security” section of the manual to find out how to run mysqld as root!

210521 4:18:27 [ERROR] Aborting

210521 4:18:27 [Note] /opt/referenceapplication-standalone-2.11.0/database/bin/mysqld: Shutdown complete

make sure you start mysql as a root for example on ubuntu , sudo /usr/local/mysql/support-files/mysql.server start

@herbert24 thanks for the response.

Im just new on OpenMRS. Im trying to install the standalone version which compose of the following.

image

I think the standalone version has its own mysql and tomcat.

Trying to follow this documentation as ubuntu version. https://wiki.openmrs.org/display/docs/OpenMRS+Standalone

Do i still need to install MySQL?

adding @keithduddy

Thank You!

sorry, i hadnt considered this (standalone),standalone comes with an emebedded database, what happens if you log in to your pc as an admin and run the standalone jar file?

hi @herbert24

Please see image below after running

run-on-unix.sh (inside run-on-unix.sh)

#!/bin/bash

java -jar openmrs-standalone.jar -commandline -noninteractive

Thank You!

@herbert24

i also tried to connect on mysql

i tried this solution below but still getting the error.

  • If you try connecting to the MySQL server from commandline and get this error message: " ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) ":
    • Add this " &server.socket=/tmp/openmrs.sock " (without the double quotes) at the end of the value in the connection.url key of the runtime properties file, and then restart the standalone application. If after doing that, you still get the same error message, then on your command line, add this: --socket=/tmp/openmrs.sock
    • Then you can connect with something like: ./mysql -u openmrs -p --socket=/tmp/openmrs.sock

Thank You!

Can you try to run the standalone again when not logged in as root? By the way, which operating system are you running?

1 Like

hi @dkayiwa thanks for the response. I am using ubuntu 20.04 LTS.

Hi @herbert24 @dkayiwa

I manage to resolve this issue by doing this on scratch.

I have another when running this.

Can you help me to resolve this kind of issue.

Thank You!

add the full server logs here https://pastebin.com/

@herbert24

Please see above link for the logs.

Thank You!