COMMIT not working in phpmyadmin (MySQL)

风格不统一 提交于 2019-12-11 13:38:01

问题


I've a mysql database with table tbl_setting with InnoDB type. Its autocommit is set to 1. I executed following queries in phpmyadmin.

begin;
INSERT INTO tbl_setting (setting_name) VALUES ('test');
commit;

While browsing from phpmyadmin, it is showing the desired result; But in command mode of Windows 8, with query SELECT * FROM tbl_setting it is not displaying the row I just inserted. I am needing to do commit in command mode to get the desired output. Shouldn't the database be updated automatically?


回答1:


After long research I found the problem. The autocommit in command mode was set 0; So, after executing SET @@AUTOCOMMIT = 1; query, the problem was solved.



来源:https://stackoverflow.com/questions/15330834/commit-not-working-in-phpmyadmin-mysql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!