Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

One TestRail issue


Does someone please help to check and resolve it, thanks!

=======================System log===================
19:03:40 [DatabaseException] Binary logging not possible. Message: Transaction level ‘READ-COMMITTED’ in InnoDB is not safe for binlog mode ‘STATEMENT’

File: /var/www/html/testrail/sys/helpers/ex.php
Line: 23
Status Code: 500
Uri: /testrail/index.php?/auth/login/ (POST)

Browser: Mozilla/5.0 (Windows NT 5.1; rv:23.0) Gecko/20100101 Firefox/23.0
PHP: 5.2.13
Server: Linux #1 SMP Thu Feb 11 07:05:37 UTC 2010 i686

rememberme: 1

at ex::raise (ex.php:23)
at ex::raise (mysql.php:128)
at Database_mysql_driver->_throw_last_error (mysql.php:67)
at Database_mysql_driver->execute (database.php:927)
at Database_library->query (user.php:216)
at User_model->_trx_upsert_login (callback.php:58)
at callback::runv (database.php:1218)
at Database_library->_transaction_exec (database.php:1204)
at Database_library->_transaction_run (database.php:1161)
at Database_library->transaction_run (user.php:203)
at User_model->upsert_login (auth.php:200)
at Auth_library->_before_login (auth.php:140)
at Auth_library->login (auth.php:57)
at Auth_controller->login (controller.php:109)
at Controller->_invoke_web (controller.php:67)
at Controller->_invoke (gizmo.php:108)
at require_once (index.php:106)

19:03:40 Database error code: 1598 (at Database_mysql_driver->_throw_last_error)
19:03:40 Query took 0.1 ms (at Database_driver->_after_query)



Hello Wilson,

Thanks for your posting.

The error message indicates that the MySQL server configuration is not compatible with TestRail and you would need to change it. The issue is that the binary log format that is enabled for your MySQL server is incompatible with InnoDB, the MySQL database engine TestRail (and most other MySQL-based applications) use. There are two options to fix this:

  1. You can either disable binary logging for your MySQL installation. In case you don’t have any specific needs for binary logging (such as replication or for your backup strategy), binary logs are not usually needed and are often disabled by default. You would simply need to edit your MySQL configuration file (my.conf) and remove the log-bin= line.

  2. You can alternatively keep using the binary log and change its format to the row-based format (opposed to the statement-based format). To do this you would also edit the MySQL configuration file and change (or add) the binlog_format line like this:


Please discuss the steps with your DBA/IT before doing any changes to your database. I hope this helps and please let me know in case you have any further questions.