Skip to main content
Support

KB Article #178943

Running Analytics dbsetup on MySQL gives the error Invalid default value for 'LogTimestamp'

Problem

When running dbsetup for Analytics on MySQL, you see an error similar to the following:


java.lang.Exception: java.lang.Exception: SQL Errror in "/opt/Axway-7.5.3/analytics/system/conf/sql/upgrades/analytics/000-initial/mysql-update.sql" on line 92: Invalid default value for 'LogTimestamp' Command: CREATE TABLE audit_log_points

Resolution

This is because the SQL setup script is not compatible with MySQL's sql_mode NO_ZERO_IN_DATE and NO_ZERO_DATE.You should remove these options.

This can be done by editing my.cnf file and set sql_mode to the following value as example:


sql_mode= "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"


Then, run the dbsetup script again.


For more information about sql_mod, you can refer to this documentation: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.h...