# MySQL database query oddity

**URL:** <https://forum.inductiveautomation.com/t/mysql-database-query-oddity/37427>\
**Category:** Ignition\
**Created:** [August 5, 2020, 9:17pm UTC](https://forum.inductiveautomation.com/t/mysql-database-query-oddity/37427 "2020-08-05T21:17:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [August 5, 2020, 9:17pm UTC](https://forum.inductiveautomation.com/t/mysql-database-query-oddity/37427/1 "2020-08-05T21:17:15Z")

</div>

@paul-griffith I am running this query against a MySQL database:

select recipeData from Recipes where recipeId = “a2daf0ae-d35a-11ea-b3a8-069f50ec786e”

If I run this query from a 7.9 machine, unusual characters (unicode) get corrupted. If I run this same query on 8.0 against the same database the unusual characters come through correctly.

I’ve just spent 2 days pounding my head against the wall trying to figure out why my editor hasn’t been working when I stumbled on this.

Help

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [August 5, 2020, 9:17pm UTC](https://forum.inductiveautomation.com/t/mysql-database-query-oddity/37427/2 "2020-08-05T21:17:55Z")

</div>

FYI the field I am querying is a json data type.

---

<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:** [August 5, 2020, 10:11pm UTC](https://forum.inductiveautomation.com/t/mysql-database-query-oddity/37427/3 "2020-08-05T22:11:18Z")

</div>

Could be an issue with the JDBC driver in 7.9, could be an issue with default character encodings on the JVM, could be an issue with Jython…lots of variables. Try the `gateway.database.selects` logger on TRACE - you’ll obviously get a lot, but it should tell you what the query is returning before (most) of the parts of the system have a chance to mangle it.

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [August 6, 2020, 11:55pm UTC](https://forum.inductiveautomation.com/t/mysql-database-query-oddity/37427/4 "2020-08-06T23:55:42Z")

</div>

I believe it is the JDBC. My old system has 5.1.23. The most recent one is 5.1.49. I want to install this alongside the existing one so if anything goes wrong I can swap back. However, I am getting an error that Classname must be unique since they are both com.mysql.jdbc.Driver

Any suggestions?

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [August 7, 2020, 12:15am UTC](https://forum.inductiveautomation.com/t/mysql-database-query-oddity/37427/5 "2020-08-07T00:15:19Z")

</div>

BTW: Do I use the jar file or the bin.jar?

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [August 7, 2020, 12:21am UTC](https://forum.inductiveautomation.com/t/mysql-database-query-oddity/37427/6 "2020-08-07T00:21:46Z")

</div>

From what I have read, they are identical so I guess it makes no difference.

---

<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:** [August 7, 2020, 2:46pm UTC](https://forum.inductiveautomation.com/t/mysql-database-query-oddity/37427/7 "2020-08-07T14:46:48Z")

</div>

You’ll have to replace the .jar file entirely (since, as you mentioned, the class has the same name) but it’s easy enough to switch it back as long as you have both versions.

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [August 7, 2020, 7:15pm UTC](https://forum.inductiveautomation.com/t/mysql-database-query-oddity/37427/8 "2020-08-07T19:15:19Z")

</div>

Thank you for the help. Upgrading the JDBC was what it needed.
