Remote Database Connection

Hello

I am trying to connect to a remote database on a remote PC. I have full connection between PCs. I can ping, remote in to each other, etc.

However, when I make a database connection to it I can't get it to be valid.

Connect URL:
jdbc:mysqldb://172.30.110.31:3306/bbs_db

image

Error:

java.sql.SQLException: Cannot create JDBC driver of class 'com.mysql.cj.jdbc.Driver' for connect URL 'jdbc:mysqldb://172.30.110.31:3306/bbs_db'
	at org.apache.commons.dbcp2.DriverFactory.createDriver(DriverFactory.java:75)
	at org.apache.commons.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:462)
	at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:528)
	at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:734)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:300)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:253)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.lambda$newRetryRunnable$0(DatasourceManagerImpl.java:1097)
	at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:593)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No suitable driver
	at org.apache.commons.dbcp2.DriverFactory.createDriver(DriverFactory.java:68)
	... 13 more

8.1.44 (b2024102210)
Azul Systems, Inc. 17.0.12

I have incoming / outgoing rules for port 3306, the correct password in the connection, etc.
I have also tried turning off all firewalls and still the connection is faulted.

Any thoughts on what I could be doing wrong? TIA.

Can you post the full stack trace that goes along with the error? It might be in the logs if not in the status page you're looking at.

java.sql.SQLException: Cannot create JDBC driver of class 'com.mysql.cj.jdbc.Driver' for connect URL 'jdbc:mysqldb://172.30.110.31:3306/bbs_db'
	at org.apache.commons.dbcp2.DriverFactory.createDriver(DriverFactory.java:75)
	at org.apache.commons.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:462)
	at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:528)
	at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:734)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:300)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:253)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.lambda$newRetryRunnable$0(DatasourceManagerImpl.java:1097)
	at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:593)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No suitable driver
	at org.apache.commons.dbcp2.DriverFactory.createDriver(DriverFactory.java:68)
	... 13 more

8.1.44 (b2024102210)
Azul Systems, Inc. 17.0.12

You sure you have the JDBC driver for MySQL installed?

Look at http://localhost:8088/web/config/database.drivers or equivalent.

I have never had to install any other version than the defaults that come with the basic vision install package. Good call though, it says I have an error on the remote PC driver?

image

Not sure how to fix this. Any tips or any other information I could grab that would be helpful?

Screenshot 2025-07-17 at 12.08.57

Follow that link to the user manual

1 Like

I will follow that trail, Thanks Kevin

What's happening here is that you might be on a fresh install for the first time and being confronted with the fact that we stopped bundling the MySQL JDBC driver at some point, because their license doesn't allow for third parties to do so. If you've been working on upgraded or older Ignition installs you maybe never had to deal with it.

It just needs to be installed manually.

I think we've figured out a way to make this better in 8.3 by modularizing JDBC drivers and maybe including them in the installer or something.

edit: or maybe modularization is just a step towards the installer being able to download and include them... not sure if we have that yet.

Weird though this is a fresh install but for 8.1.44

Unbundling MySQL probably happened years ago, so not surprising.

Have you tried: jdbc:mysqldb://172.30.110.31\MSSQLSERVER:3306

And then in Extra properties databaseName=bbs_db

Still have the error unfortunately..

java.sql.SQLException: Cannot create JDBC driver of class 'com.mysql.cj.jdbc.Driver' for connect URL 'jdbc:mysqldb://172.30.110.31:3306/bbs_db'
	at org.apache.commons.dbcp2.DriverFactory.createDriver(DriverFactory.java:75)
	at org.apache.commons.dbcp2.BasicDataSource.createConnectionFactory(BasicDataSource.java:462)
	at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:528)
	at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:734)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:300)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(DatasourceImpl.java:253)
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.lambda$newRetryRunnable$0(DatasourceManagerImpl.java:1097)
	at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$TrackedTask.run(BasicExecutionEngine.java:593)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No suitable driver
	at org.apache.commons.dbcp2.DriverFactory.createDriver(DriverFactory.java:68)
	... 13 more

8.1.44 (b2024102210)
Azul Systems, Inc. 17.0.12

Does that page say you have a valid MySQL JDBC driver now? Have you restarted the Ignition Gateway since placing those JAR files?

Thanks but that didn't work :confused:

After I installed the JAR file the error for the driver went away. I also restarted the gateway.

Might need to get with support so they can take a look.

There must be something with the the JDBC driver install, because the error indicates it can't be found.

Will do thanks man