# MySQL connection fault

**URL:** <https://forum.inductiveautomation.com/t/mysql-connection-fault/21155>\
**Category:** Ignition\
**Created:** [November 30, 2018, 10:18am UTC](https://forum.inductiveautomation.com/t/mysql-connection-fault/21155 "2018-11-30T10:18:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![eduardo.ojalvo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/eduardo.ojalvo/32/14356_2.png) [@eduardo.ojalvo](https://forum.inductiveautomation.com/u/eduardo.ojalvo)\
**Post date:** [November 30, 2018, 10:18am UTC](https://forum.inductiveautomation.com/t/mysql-connection-fault/21155/1 "2018-11-30T10:18:21Z")

</div>

Hi everybody,  
I´m trying to connect to a mysql database and it´s not possible because an error like this i get.  
Anybody has an idea?

“org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unable to load authentication plugin ‘caching\_sha2\_password’.)  
Caused by: java.sql.SQLException: Unable to load authentication plugin ‘caching\_sha2\_password’.”

My connection url is like this :  
jdbc:mysql://localhost:3306/normon\_report  
My ignition gateway is a 7.9.9 version.

Thank you very much.

Eduardo.

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [November 30, 2018, 10:48am UTC](https://forum.inductiveautomation.com/t/mysql-connection-fault/21155/2 "2018-11-30T10:48:07Z")

</div>

As per [this post](https://stackoverflow.com/questions/50387952/how-to-resolve-unable-to-load-authentication-plugin-caching-sha2-password-issu) on StackOverflow, starting with MySQL 8.0.4 they have changed the default authentication plugin for MySQL server from `mysql_native_password` to `caching_sha2_password`.

You can either force it back to using the older password plugin or try using the newest MySQL connector/J.

---

<div class="post-metadata">

**Author:** ![eduardo.ojalvo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/eduardo.ojalvo/32/14356_2.png) [@eduardo.ojalvo](https://forum.inductiveautomation.com/u/eduardo.ojalvo)\
**Post date:** [November 30, 2018, 12:19pm UTC](https://forum.inductiveautomation.com/t/mysql-connection-fault/21155/3 "2018-11-30T12:19:23Z")

</div>

Thank you,  
I have tried to do this as the link above and now have another error.

“[https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/125/0/connection-errors-when-configuring-mysql-80-database-in-ignition](https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/125/0/connection-errors-when-configuring-mysql-80-database-in-ignition)”

My new error is:  
“Cannot create PoolableConnectionFactory (The server time zone value ‘Hora estándar romance’ 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.)”

😡

---

<div class="post-metadata">

**Author:** ![eduardo.ojalvo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/eduardo.ojalvo/32/14356_2.png) [@eduardo.ojalvo](https://forum.inductiveautomation.com/u/eduardo.ojalvo)\
**Post date:** [November 30, 2018, 2:14pm UTC](https://forum.inductiveautomation.com/t/mysql-connection-fault/21155/4 "2018-11-30T14:14:10Z")

</div>

Sorry i mean below  
“[https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/125/0/connection-errors-when-configuring-mysql-80-database-in-ignition](https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/125/0/connection-errors-when-configuring-mysql-80-database-in-ignition)”

---

<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:** [November 30, 2018, 3:20pm UTC](https://forum.inductiveautomation.com/t/mysql-connection-fault/21155/5 "2018-11-30T15:20:42Z")

</div>

> [@eduardo.ojalvo](#):
>
> "Cannot create PoolableConnectionFactory (The server time zone value 'Hora estándar romance' 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.)"

You need to add a `serverTimezone` property to the connection properties for that MySQL connection - eg:  
`serverTimezone=UTC` or `serverTimezone=America/Los Angeles`. There's a change going into 7.9.11 that will automatically add the gateway's timezone to your connection string if it's not already populated, but until that happens you will need to set it manually.

---

<div class="post-metadata">

**Author:** ![eduardo.ojalvo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/eduardo.ojalvo/32/14356_2.png) [@eduardo.ojalvo](https://forum.inductiveautomation.com/u/eduardo.ojalvo)\
**Post date:** [November 30, 2018, 5:15pm UTC](https://forum.inductiveautomation.com/t/mysql-connection-fault/21155/6 "2018-11-30T17:15:10Z")

</div>

Thank you very much.

---

<div class="post-metadata">

**Author:** ![rs326](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rs326/32/4500_2.png) [@rs326](https://forum.inductiveautomation.com/u/rs326)\
**Post date:** [April 3, 2019, 5:28am UTC](https://forum.inductiveautomation.com/t/mysql-connection-fault/21155/7 "2019-04-03T05:28:24Z")

</div>

> [@paul-griffith](#):
>
> serverTimezone=UTC

Had me stumped this one. Thanks.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 17, 2019, 5:26am UTC](https://forum.inductiveautomation.com/t/mysql-connection-fault/21155/8 "2019-12-17T05:26:06Z")

</div>

How do you get this list of the available timezones? I keep getting this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/190c86cfa12f119bf76c59de4b7fa64b7a1ee9b5.png)

I tried using everything (i.e. Id, DisplayName) from the result from running PowerShell command: get-timezone  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b7ee5a2278259cac9ae115af9b07588f5c1ee52d.png)

and also had a look in the windows registry for all available timezones:  
`HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones`

Edit:  
It seems like you have to use the format: Country/City, as in your example (couldn’t get your example to work originally)

---

<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:** [December 17, 2019, 4:20pm UTC](https://forum.inductiveautomation.com/t/mysql-connection-fault/21155/9 "2019-12-17T16:20:01Z")

</div>

To get the full list supported by your local Java runtime:

```auto
from java.util import TimeZone

for tzid in TimeZone.getAvailableIDs():
	print tzid

```
