Database Storage Unavailable

Trying to log data using SQLTags Historian and all data is getting stuck in the Store and Forward engine. MySQL database connection appears valid, and SQLTags Providers shows 14 History Tags in the Default Historical scan class, but Store & Forward Engines show Database Storage Unavailable. Therefore, Local Cache is 4000+ and climbing. Console message:

java.lang.Exception: Could not store data, tag history store could not be initialized. Will try again soon.

I did a clean reinstall of MySQL but no change. Port 3306 is open, and root password is good. Test schema contains sqlth* tables, but are all empty. Any ideas?

Ignition version 7.6.4
MySQL version 5.2.47

Are there any other error messages?
What is the complete stack trace to this error?

You can set the level that is throwing this error to debug and you may get some additional information about what is going on. You can post it here.

I reinstalled MySQL 5.6.15.0 and reinstalled Ignition 7.6.4 and everything works fine now.
No idea what the cause was, but it seems to be fixed . . .

I’m coming up with the exact same problem!
New install, everything working well until adding tags to historian.
Ignition 7.6.4
MySQL 5.6.16

Analysis DB and Production DB for the OEE module functioning perfectly.

For some reason ignition cannot write to the DB I am using for history. I have tried two different databases and same results each time.
Same as above, stuck in store and forward, Database Storage Unavailable.

This is the error I get in the console:
TagHistoryDatasourceSink
Error Initializing Data Sink

Time 	Logger 	Message

[ERROR] 1:52:04 PM TagHistoryDatasourceSink Error initializing data sink.

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:833)
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runScalarPrepQuery(SRConnectionWrapper.java:194)
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.getDriverId(TagHistoryDatasourceSink.java:354)
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.createPartitionManager(TagHistoryDatasourceSink.java:252)
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.initialize(TagHistoryDatasourceSink.java:224)
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.tryToInit(AbstractSink.java:112)
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.tryToInit(TagHistoryDatasourceSink.java:213)
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.isAccepting(AbstractSink.java:129)
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractDatasourceSink.isAccepting(AbstractDatasourceSink.java:82)
at com.inductiveautomation.ignition.gateway.sqltags.history.storage.TagHistoryDatasourceSink.isAccepting(TagHistoryDatasourceSink.java:288)
at com.inductiveautomation.ignition.gateway.history.sinks.AggregateSink.isAccepting(AggregateSink.java:88)
at com.inductiveautomation.ignition.gateway.history.forwarders.ForwarderThread.run(ForwarderThread.java:122)

Any help would be appreciated. Thanks.

This issue is usually caused by the wrong JDBC driver being used in Ignition when connected to MySQL 5.6. This can be resolved by downloading the latest ConnectorJ zip file from the MsSQL database and then installing it in the gateway.

You can follow KB 154 to correct this issue.
inductiveautomation.com/support/kb?0=154

Thanks Greg, that fixed the problem.

Cheers! :thumb_left: