In corporate database systems, it is generally preferred to build transaction stacks. This allows for having multiple database statements run and be finally committed if everything is ok. In MySQL, auto commit is on by default; which means that every statement is instantly committed. To check the value of auto commit, run the following MySQL command:
So in order to turn off auto commit, run the following command in MySQL:
If you want auto commit turned off permanently, we need to edit your my.cnf file. In the [mysqld], add the following line:
Restart MySQL and you are now ready to do full transaction processing.