MySQL PHPMyAdmin Autocommit Off

MySQLphpmyadmin

I have global autocommits off but I was wondering if it were possible to set autocommit on for PHPMyAdmin during login without doing so manually. Turning off autocommit makes the PHPMyAdmin GUI not work properly (clicking 'delete' on a row won't actually delete it since there isn't a commit). Since PHPMyAdmin creates a new session on each page load, setting autocommit on doesn't do anything since it immediately gets 'wiped out'. I have to manually type in queries followed by a commit.

Best Answer

You could set a trigger to watch for a session coming in from phpmyadmin or a specific user. That trigger could fire once the session is created and enable autocommit. Since MySQL 5.7 still doesn't support all the DDL command you could use init_connect to drive the procedure when a user connects.

Here is a document outlining the init_connect operation. Logon Init_connect operation