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 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:
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(
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
at com.mysql.jdbc.MysqlIO.sendCommand(
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
at com.mysql.jdbc.Connection.execSQL(
at com.mysql.jdbc.Connection.execSQL(
at com.mysql.jdbc.PreparedStatement.executeQuery(
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper$SRPreparedStatement.executeQuery(
at com.inductiveautomation.ignition.gateway.datasource.SRConnectionWrapper.runScalarPrepQuery(
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.tryToInit(
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractSink.isAccepting(
at com.inductiveautomation.ignition.gateway.history.sinks.AbstractDatasourceSink.isAccepting(
at com.inductiveautomation.ignition.gateway.history.sinks.AggregateSink.isAccepting(

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.

Thanks Greg, that fixed the problem.

Cheers! :thumb_left: