Search code examples
mysqlsharedautocommit

MYSQL AutoCommit in shared environment


I am working on a server that is shared amongst many in my company. There are multiple DBs on the server and I don't control the server.

The sys admins have set the defaults up with autocommit set to false. This causes me trouble when trying to use PHPMYADMIN.

Can I safely set the autocommit to true without affecting other DBs on the server? I assume yes, but the ramifications if I wrong could negatively affect other users.


Solution

  • You can set autocommit with

    SET SESSION autocommit = 1;
    

    so that it only affects your current connection, but this setting is not saved. Every time you reload or switch a site in PHPMyAdmin, this setting is reverted.

    Setting it globally, which is the only other option, would change it for all users.