Connection Refused with mysql db

Hi, I am new to flowable. I need a lil help with connecting to mysql database with flowable set up in apache Tomcat. Much appreciated!

I am trying to connect to the mysql database set up on an ubuntu server (VM) from flowable that is set up in apache Tomcat (host machine)

I have added a file tomcat\lib\flowable-ui-app.properties

datasource.driver = com.mysql.jdbc.Driver
datasource.url=jdbc:mysql://192.168.1.1:3306/flowable?characterEncoding=UTF-8
datasource.username = flowable
datasource.password = flowable

Privileges are granted on mysql and I can ping from host to server and server to host. Firewalls are down for both client and server.

The error I received was…

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

Caused by: java.net.ConnectException: Connection refused

Hi,

can you connect with the mysql command line tools or a GUI tool from the same host with the same connection settings?

Regards,

Yvo

Hi, thank you! I managed to solve it.

The issue was that I could not connect as mysql database was not listening on the IP address.

I commented the bind-address line

bind-address =127.0.0.1

in mysql.conf file which can be found in one of the mysql configuration files.

For Flowable 6.3 onwards, there is no flowable-ui-app.properties, instead use provided application.properties, should be placed inside $CATALINA_HOME/lib/config folder for Tomcat. Inside application.properties, we can put only the things we want to be overridden e.g. database details.

Example
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/flowable?useSSL=false&nullNamePatternMatchesAll=true&characterEncoding=UTF-8
spring.datasource.username=flowable
spring.datasource.password=flowable