MySQL on Debian Linux Gateway - Installation and Connection Error

Slowly working my way through IU training and I am now at the point of building a demonstration system. I am trying to install MySQL and create a DB connection. My Ignition Gateway and MySQL DB are installed on the same headless Debian Linux server. Here are the steps I took:

  1. I installed MySQL 8.0 via the mysql-apt-config_0.8.22-1_all.deb package obtained from Oracle.
  2. I installed the connector via the mysql-connector-java_8.0.28-1debian11_all.deb obtained from Oracle
  3. I recieved the “missing files” error when attempting to create the connection in the Database connections configuration page. To solve this (this may be the incorrect method) I copied the mysql-connector-java-8.0.28.jar file from the /usr/share/java folder on the server to my Windows client so I then point to it when updating the driver file.
  4. I then created a DB connection, which faulted with the following error:
java.sql.SQLException: Cannot create PoolableConnectionFactory (Access denied for user 'sa'@'localhost' (using password: YES))
	at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(
	at org.apache.commons.dbcp2.BasicDataSource.createDataSource(
	at org.apache.commons.dbcp2.BasicDataSource.getConnection(
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.runTest(
	at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl$FaultedDatasourceRetryer.lambda$newRetryRunnable$0(
	at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$
	at java.base/java.util.concurrent.Executors$ Source)
	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
	at java.base/ Source)
Caused by: java.sql.SQLException: Access denied for user 'sa'@'localhost' (using password: YES)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(
	at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(
	at com.mysql.cj.jdbc.ConnectionImpl.<init>(
	at com.mysql.cj.jdbc.ConnectionImpl.getInstance(
	at com.mysql.cj.jdbc.NonRegisteringDriver.connect(
	at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(
	at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(
	at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(
	at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(
	... 12 more

8.1.12 (b2021111810)
Azul Systems, Inc. 11.0.11

Any ideas on where to start?

The error’s pretty straightforward. Make sure your credentials are correct, or, better, make a new user account on MySQL just for Ignition to use, instead of your sa account (even for a testing system, it’s not really a good practice).


I think you are on to something. When I installed MySQL, I didn’t create an acount. So, MySQL is either not accepting the credentials I am giving it for the default user account that was created during installation or there arent any accounts at all.

Let me explore what accounts exist in the existing MySQL installaiton and if necessary I’ll create a new one as you suggest. I’ll report back.

Issue is resolved. There were actualy two problems:

  1. When I created the DB connection in Ignition, I was not using the correct password for the default root user. Once I used the correct password, I cleared the authentication error. However (see point #2).
  2. The DB Configuration was pointing to a “test” database in the connection configuration that didn’t exist. I had to manualy create a “test” database in MySQL.

Once I perofrmed the above actions, I was able to create a VALID DB connection in ignition.

As previosuly suggested, I created a second user with permissions and created a new connection using those credentials instead.

Thank you for the support.

1 Like