File "/var/lib/juju/agents/unit-mysql-innodb-cluster-0/charm/reactive/mysql_innodb_cluster_handlers.py", line 302, in db_router_respond
if instance.create_databases_and_users(db_router):
File "lib/charm/openstack/mysql_innodb_cluster.py", line 1181, in create_databases_and_users
password = self.configure_db_router(
File "lib/charm/openstack/mysql_innodb_cluster.py", line 1318, in configure_db_router
password = rw_helper.configure_router(host, username)
File "/var/lib/juju/agents/unit-mysql-innodb-cluster-0/.venv/lib/python3.8/site-packages/charmhelpers/contrib/database/mysql.py", line 774, in configure_router
self.create_router_grant(username, remote_ip, password)
File "/var/lib/juju/agents/unit-mysql-innodb-cluster-0/.venv/lib/python3.8/site-packages/charmhelpers/contrib/database/mysql.py", line 747, in create_router_grant
cursor.execute("GRANT CREATE USER ON *.* TO '{}'@'{}' WITH GRANT "
MySQLdb._exceptions.OperationalError: (1785, 'Statement violates GTID consistency: Updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.')
So the issue appears when the charm tries to assign a permission to a user to create new users with the right to delegate this permission.
A shorter piece of output which is of interest:
File "/var/lib/ juju/agents/ unit-mysql- innodb- cluster- 0/charm/ reactive/ mysql_innodb_ cluster_ handlers. py", line 302, in db_router_respond create_ databases_ and_users( db_router) : openstack/ mysql_innodb_ cluster. py", line 1181, in create_ databases_ and_users db_router( openstack/ mysql_innodb_ cluster. py", line 1318, in configure_db_router configure_ router( host, username) juju/agents/ unit-mysql- innodb- cluster- 0/.venv/ lib/python3. 8/site- packages/ charmhelpers/ contrib/ database/ mysql.py" , line 774, in configure_router create_ router_ grant(username, remote_ip, password) juju/agents/ unit-mysql- innodb- cluster- 0/.venv/ lib/python3. 8/site- packages/ charmhelpers/ contrib/ database/ mysql.py" , line 747, in create_router_grant execute( "GRANT CREATE USER ON *.* TO '{}'@'{}' WITH GRANT "
if instance.
File "lib/charm/
password = self.configure_
File "lib/charm/
password = rw_helper.
File "/var/lib/
self.
File "/var/lib/
cursor.
MySQLdb. _exceptions. OperationalErro r: (1785, 'Statement violates GTID consistency: Updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.')
So the issue appears when the charm tries to assign a permission to a user to create new users with the right to delegate this permission.