Question - SUPER privilege and binary logging is enabled

Some upgrades in eramba require creating triggers (db/sql terminology) and that typically requires some special permissions on the user that eramba is using to connect to the database.

the typical error you will see is something like this:

zzzz@zzzz:/var/www/eramba/app$ sudo Console/cake community migrate
2019-09-10 16:57:22 Error: Migration error: SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
/var/www/eramba/app/upgrade/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:349
#0 /var/www/eramba/app/upgrade/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(349): PDO->query('CREATE TRIGGER ...')
#1 /var/www/eramba/app/upgrade/vendor/robmorgan/phinx/src/Phinx/Migration/AbstractMigration.php(200): Phinx\Db\Adapter\PdoAdapter->query('CREATE TRIGGER ...')
#2 /var/www/eramba/app/upgrade/config/Migrations/20180902095944_UserFieldsObjectsMigration.php(54): Phinx\Migration\AbstractMigration->query('CREATE TRIGGER ...')
#3 /var/www/eramba/app/upgrade/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(125): UserFieldsObjectsMigration->up()
#4 /var/www/eramba/app/upgrade/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(366): Phinx\Migration\Manager\Environment->executeMigration(Object(UserFieldsObjectsMigration), 'up')
#5 /var/www/eramba/app/upgrade/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(342): Phinx\Migration\Manager->executeMigration('default', Object(UserFieldsObjectsMigration), 'up')
#6 /var/www/eramba/app/upgrade/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(113): Phinx\Migration\Manager->migrate('default', 20191015094001)
#7 /var/www/eramba/app/upgrade/vendor/symfony/console/Command/Command.php(255): Phinx\Console\Command\Migrate->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))

when eramba tries to create triggers on the db , the answer is permission denied. this is no more than a database configuration issue (grant trigers or grant super to the user) so please review the engine db manual for GRANT or disable binary logging (if you are not replicating the db) by commenting the configuration lines log_bin and log_bin_index which will most likely make it happen without the grants.

Where exactly would one do that?

SET sql_log_bin = {OFF|ON}
SET log_bin_trust_function_creators={OFF|ON}

1 Like