???Unable to connect to database??? ???User account root does not work. Could not create connection to database server. Attempted reconnect 3 times. Giving up. See the error log for more details???

Hello all! I am have some trouble starting my server. I have gone through all the solution you guys have proposed but none of them work for me. I have successfully set this up before, but this time it’s not working. Here is a log of my error. Error Message - Pastebin.com I used the SDK to set this up.

The underlying error explains things fairly clearly:

The server time zone value ‘EDT’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the ‘serverTimezone’ configuration property) to use a more specifc time zone value if you want to utilize time zone support.

It looks like your MySQL server is setup with “EDT” as its time zone, which isn’t a timezone MySQL understands. You can either fix your MySQL server configuration (lots of details here, but maybe just changing the default_time_zone value to something MySQL understands, e.g. “US/Eastern”). Alternatively, as the message says, you can modify your JDBC connection string (the connection.url property in the openmrs-runtime.properties file for you server) to something like:

connection.url=jdbc\:mysql\://localhost\:3308/openmrs?autoReconnect\=true&sessionVariables\=default_storage_engine%3DInnoDB&useUnicode\=true&characterEncoding\=UTF-8&serverTimezone\=US/Eastern
1 Like

Thank you! It worked.

Hi, im getting the same problem starting my server but I don’t think its due to the same reason. This is the cause I get on my log: (Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure) Would you kindly help me?

Hi @ray

Please add useSSL=false onto the connection.url (Eg)

connection.url=jdbc:mysql://localhost:3308/openmrs?autoReconnect=true&sessionVariables=default_storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8&serverTimezone=US/Eastern&useSSL=false

Mostly been facing the same challenge when I install 2.11.0 Ref app and below versions.

Thank you. I’ve done that and now I’m getting other error messages.

WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2033) |2022-06-16T14:37:30,531| Unable to find a runtime properties file at /Users/rayangadmor/git/openmrs-core/webapp/openmrs-runtime.properties

WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2061) |2022-06-16T14:37:30,537| Unable to find properties file: /Users/rayangadmor/.OpenMRS/openmrs-runtime.properties

WARN - InitializationFilter.executeStatement(1179) |2022-06-16T14:38:37,183| error executing sql: create database if not exists ? default character set utf8

java.sql.SQLException: Failed to create schema directory ‘openmrs’ (errno: 2 - No such file or directory)

Can you please help. I have been stuck on simple installation steps for sooo long. I’m using mysql version 8.0.29 on MacOS 11.5.2,

Ping me on slack(abertnamanya) we have a short call.

@ray Kindly ensure that MySQL is running.

ok thanks, im just getting it set up. Can you send me your email?

Yes, its running.

When your done setting up slack join openmrs.slack.com channel. Then search abertnamanya