# MySQL JDBC Driver Errors in Dockerized Ignition Setup

**URL:** <https://forum.inductiveautomation.com/t/mysql-jdbc-driver-errors-in-dockerized-ignition-setup/89442>\
**Category:** Ignition\
**Tags:** ignition81, docker, database\
**Created:** [April 25, 2024, 12:04pm UTC](https://forum.inductiveautomation.com/t/mysql-jdbc-driver-errors-in-dockerized-ignition-setup/89442 "2024-04-25T12:04:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ROrtiz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rortiz/32/61395_2.png) [@ROrtiz](https://forum.inductiveautomation.com/u/ROrtiz)\
**Post date:** [April 25, 2024, 12:04pm UTC](https://forum.inductiveautomation.com/t/mysql-jdbc-driver-errors-in-dockerized-ignition-setup/89442/1 "2024-04-25T12:04:12Z")

</div>

I encountered an issue while setting up my Docker Compose environment (Ignition, MySQL, and SMTP server) for training.

I'm automating the upload of the MySQL JDBC driver by mounting the file directly to the expected JDBC path in my Ignition container. However, placing the .jar file directly at the designated location caused the other drivers to appear faulted. Even though MySQL was listed as installed, I couldn't establish a successful connection to my database.

As a test, I set up the same Docker stack without the volume mount, which allowed me to observe the default state of installed or faulted drivers. I then manually uploaded the .jar file from my host machine and attempted a connection, which succeeded.

Currently, my workaround is to upload the file during container creation, ensuring the gateway has the necessary driver for MySQL.

Any insights on why directly mounting the file causes issues with other drivers and connection establishment?

```python
- ./jdbc:/usr/local/bin/ignition/user-lib/jdbc/

```

![a85f3e79-282c-487f-98b1-f70ff0559d57](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/6/a64fb7fc8e27c392356d6fef3a22f26460b36351.jpeg)  
**Impact of Direct JDBC Mounting: Faulted Drivers in Ignition Gateway**

 ![09f0e9dd-7b40-4068-b38d-66e337067e02](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/5/c55a01c948fb31064e5ec4583aa72724222dd841.jpeg)  
**Impact of Direct JDBC Mounting: Failed DB Connection**  
 ![8ddc9d99-79a5-4c13-8e29-9b78ff13af70](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/f/5fae9154e971fdebe2a254547e602850675b63b6.jpeg)  
**Default State of JDBC Drivers in Ignition Gateway Without Mounting**  
 ![697cae6d-7db6-44f8-9109-c7cde60de3d8](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/8/483b7c05c3159031d514c9dc5026aa5acc1b91f0.jpeg)  
**Manually Uploading of .jar File**  
 ![64a9d151-eacb-44bb-af54-fb8b10009103](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/e/be057d56cd5618124083159ab55cb86631caa2d8.jpeg)  
**MySQL Driver Installed Status**  
 ![90803b37-cb85-49a4-99d9-f694cda99239](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/f/bf6a43aa15e1d3069dac05adf3e96002f031bea0.jpeg)  
**Successful DB Connection**  
 ![2dca254c-be1c-49e1-a083-5d4fa96934dd](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/6/169d5a2e146268294162a7c1385bc86a73f27282.jpeg)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 25, 2024, 12:25pm UTC](https://forum.inductiveautomation.com/t/mysql-jdbc-driver-errors-in-dockerized-ignition-setup/89442/2 "2024-04-25T12:25:08Z")

</div>

Consider preloading a gateway backup--that contains the JDBC drivers **and metadata** for them from the source system.

---

<div class="post-metadata">

**Author:** ![ROrtiz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rortiz/32/61395_2.png) [@ROrtiz](https://forum.inductiveautomation.com/u/ROrtiz)\
**Post date:** [April 25, 2024, 12:41pm UTC](https://forum.inductiveautomation.com/t/mysql-jdbc-driver-errors-in-dockerized-ignition-setup/89442/3 "2024-04-25T12:41:34Z")

</div>

Appreciate the feedback. I'll be sure to use this approach going forward. Just wanted to double-check that I wasn't overlooking a step in my original attempt using a volume mount.

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [April 25, 2024, 2:47pm UTC](https://forum.inductiveautomation.com/t/mysql-jdbc-driver-errors-in-dockerized-ignition-setup/89442/4 "2024-04-25T14:47:19Z")

</div>

You should be able to bind-mount _that specific driver_ all the way into place, e.g.:

```yaml
- ./jdbc/mysql-connector-j-8.3.0.jar:/usr/local/bin/ignition/user-lib/jdbc/mysql-connector-j.jar

```

By bind-mounting the entire folder, you effectively shadow the pre-existing files that are part of the image (such as the MariaDB, Postgres, and MSSQL JDBC drivers, as well as the commons-dbcp2 and commons-pool2 JARs).

---

<div class="post-metadata">

**Author:** ![ROrtiz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rortiz/32/61395_2.png) [@ROrtiz](https://forum.inductiveautomation.com/u/ROrtiz)\
**Post date:** [April 25, 2024, 3:29pm UTC](https://forum.inductiveautomation.com/t/mysql-jdbc-driver-errors-in-dockerized-ignition-setup/89442/5 "2024-04-25T15:29:00Z")

</div>

> [@kcollins](#):
>
> mage (such as the MariaDB, Postgr

I have just verified this suggestion and it worked. Thank you!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 25, 2024, 3:44pm UTC](https://forum.inductiveautomation.com/t/mysql-jdbc-driver-errors-in-dockerized-ignition-setup/89442/6 "2024-04-25T15:44:18Z")

</div>

Tangent to the main question posed, worth noting that you probably also don't need the MySQL driver at all. The MariaDB driver (as far as I know) is able to connect to MySQL no problem.

---

<div class="post-metadata">

**Author:** ![meredithj](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@meredithj](https://forum.inductiveautomation.com/u/meredithj)\
**Post date:** [April 25, 2024, 9:06pm UTC](https://forum.inductiveautomation.com/t/mysql-jdbc-driver-errors-in-dockerized-ignition-setup/89442/7 "2024-04-25T21:06:31Z")

</div>

I have found that the Maria driver performs better as well. We switched a customer from the MySQL to Maria driver and got more than 10% CPU back (we are really really heavy DB users).

Some performance comparisons that may or may not be biased.

> **[MariaDB Java Connector Driver Performance | MariaDB](https://mariadb.com/resources/blog/mariadb-java-connector-driver-performance/)**
>
> We always talk about performance. But the thing is always “Measure, don’t guess!”. A lot of performance improvement has been done lately on the MariaDB Java Connector. So, what the current driver…

And you have the advantage of not having to deal with extra licensing terms.

---

<div class="post-metadata">

**Author:** ![ROrtiz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rortiz/32/61395_2.png) [@ROrtiz](https://forum.inductiveautomation.com/u/ROrtiz)\
**Post date:** [April 26, 2024, 12:13pm UTC](https://forum.inductiveautomation.com/t/mysql-jdbc-driver-errors-in-dockerized-ignition-setup/89442/8 "2024-04-26T12:13:22Z")

</div>

Thanks for sharing!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 27, 2026, 4:49pm UTC](https://forum.inductiveautomation.com/t/mysql-jdbc-driver-errors-in-dockerized-ignition-setup/89442/10 "2026-02-27T16:49:16Z")

</div>

A post was split to a new topic: [MariaDB Driver issues](https://forum.inductiveautomation.com/t/mariadb-driver-issues/114235)
