This article will discuss the issue of being unable to setup a software form factor API Gateway with the following error seen during setup:
Error creating database when saving configuration 'Unable to create database'
During the API Gateway software setup a Database Creation error, related to MySQL Binary Logging, may present itself when attempting to create a Database. The default MySQL settings contain a particular MySQL global variable, set to 'off', which can interfere with the creation of the API Gateway database. The global variable in question is the “log_bin_trust_function_creators” variable. By enabling this variable the conditions surrounding function creation are relaxed and the database creation should proceed without issue. For more information on this subject please review the MySQL Binary Logging documentation.
This article applies to all supported versions of the API Gateway when installing the software form factor.
One root cause is related to MySQL Binary Logging functionality in the MySQL server. The default MySQL settings contain a particular MySQL global variable, set to off, which can interfere with the creation of the API Gateway database. The global variable in question is the “log_bin_trust_function_creators” variable. By enabling this variable conditions surrounding function creation are relaxed and the database creation should proceed without issue. For more information on this subject please review the MySQL Binary Logging documentation.
One way to confirm if this is caused by the binary logging is to check the log file /opt/SecureSpan/Gateway/config/logs/config.log and locate text that may read similar to the following:
You do not have the SUPER privilege and binary logging is enabled
The log file location and name is different in the window server and it should be defined in the mysql configuration file: my.ini.
Also, the table ssg.DATABASECHANGELOG can be used to track actual database creation progress and where it stopped.
If the above log entry is found, this is for sure a binary logging-caused issue in MySQL. Be sure to follow the steps below to resolve: