# Error logging historical tags

**URL:** <https://forum.inductiveautomation.com/t/error-logging-historical-tags/10155>\
**Category:** Ignition\
**Created:** [June 19, 2015, 8:46pm UTC](https://forum.inductiveautomation.com/t/error-logging-historical-tags/10155 "2015-06-19T20:46:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![njsd](https://avatars.discourse-cdn.com/v4/letter/n/54ee81/32.png) [@njsd](https://forum.inductiveautomation.com/u/njsd)\
**Post date:** [June 19, 2015, 8:46pm UTC](https://forum.inductiveautomation.com/t/error-logging-historical-tags/10155/1 "2015-06-19T20:46:19Z")

</div>

Hello,

I have a MySQL database (5.6.24) that I recently installed to develop with. I created some historical tags and was surprised that they didn’t begin logging. There is a sqlth\_te table in the schema, but it’s not adding the historical tags.

I looked in the Gateway console and found this error popping up at the historical scanclass rate of 10s.

[quote] 3:33:09 PM MemoryForwardTransaction Error forwarding data: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘OPTION SQL\_SELECT\_LIMIT=1’ at line 1

com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘OPTION SQL\_SELECT\_LIMIT=1’ at line 1  
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)  
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2934)  
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)  
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)  
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)  
at com.mysql.jdbc.Connection.execSQL(Connection.java:3178)  
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1408)  
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRPreparedStatement.executeQuery(SRConnectionWrapper.java:861)  
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runScalarPrepQuery(SRConnectionWrapper.java:215)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.getIdOfScanclassName(TagHistoryDatasourceSink.java:524)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.updateSCExecRecord(TagHistoryDatasourceSink.java:484)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.storeScanClassSet(TagHistoryDatasourceSink.java:326)  
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.storeDataToDatasource(TagHistoryDatasourceSink.java:312)  
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractDatasourceSink.storeToDatasource(AbstractDatasourceSink.java:123)  
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractDatasourceSink.storeData(AbstractDatasourceSink.java:99)  
at com.inductiveautomation.ignition.gateway.history.sinks.AggregateSink.storeData(AggregateSink.java:147)  
at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:138)[/quote]

Anyone seen this? Know how to fix it?

Thanks,

-Nick

---

<div class="post-metadata">

**Author:** ![njsd](https://avatars.discourse-cdn.com/v4/letter/n/54ee81/32.png) [@njsd](https://forum.inductiveautomation.com/u/njsd)\
**Post date:** [June 22, 2015, 7:11pm UTC](https://forum.inductiveautomation.com/t/error-logging-historical-tags/10155/2 "2015-06-22T19:11:08Z")

</div>

I was pointed to this knowledgebase solution:

[support.inductiveautomation.com … g-mysql-56](https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/37/0/mysql-syntax-error-near-option-sql_select_limit1-received-when-using-mysql-56)

Worked great.
