首页 > 数据库 >MySQL - Disable autocommit globally

MySQL - Disable autocommit globally

时间:2024-09-07 10:24:30浏览次数:10  
标签:autocommit files set option globally Disable mysql +----+-------------+---------

 

Copied from: https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html#sysvar_autocommit

 

6.2.2.2 Using Option Files

Most MySQL programs can read startup options from option files (sometimes called configuration files). Option files provide a convenient way to specify commonly used options so that they need not be entered on the command line each time you run a program.

To determine whether a program reads option files, invoke it with the --help option. (For mysqld, use --verbose and --help.) If the program reads option files, the help message indicates which files it looks for and which option groups it recognizes.

Note

A MySQL program started with the --no-defaults option reads no option files other than .mylogin.cnf.

A server started with the persisted_globals_load system variable disabled does not read mysqld-auto.cnf.

Many option files are plain text files, created using any text editor. The exceptions are:

 

Copief from: https://dev.mysql.com/doc/refman/8.4/en/option-files.html

 

mysql> SET PERSIST autocommit=0;
Query OK, 0 rows affected (0.00 sec)

Exit mysql and re-connect, you can find it works:

mysql> SELECT * FROM user;
+----+-------------+------------------------+--------------------------------------------------------------+---------------------+
| id | name        | email                  | hashed_password                                              | created             |
+----+-------------+------------------------+--------------------------------------------------------------+---------------------+
|  3 | ZhangZhihui | [email protected] | $2a$12$uTPD9RGtk4nt4rfS6yBF9.GcbV2vM0K557CdhJtEcwpCt1u5QQvp. | 2024-09-06 08:33:02 |
+----+-------------+------------------------+--------------------------------------------------------------+---------------------+
1 row in set (0.00 sec)

mysql> UPDATE user SET id = 1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> SELECT * FROM user;
+----+-------------+------------------------+--------------------------------------------------------------+---------------------+
| id | name        | email                  | hashed_password                                              | created             |
+----+-------------+------------------------+--------------------------------------------------------------+---------------------+
|  1 | ZhangZhihui | [email protected] | $2a$12$uTPD9RGtk4nt4rfS6yBF9.GcbV2vM0K557CdhJtEcwpCt1u5QQvp. | 2024-09-06 08:33:02 |
+----+-------------+------------------------+--------------------------------------------------------------+---------------------+
1 row in set (0.00 sec)

mysql> ROLLBACK;
Query OK, 0 rows affected (0.01 sec)

mysql> SELECT * FROM user;
+----+-------------+------------------------+--------------------------------------------------------------+---------------------+
| id | name        | email                  | hashed_password                                              | created             |
+----+-------------+------------------------+--------------------------------------------------------------+---------------------+
|  3 | ZhangZhihui | [email protected] | $2a$12$uTPD9RGtk4nt4rfS6yBF9.GcbV2vM0K557CdhJtEcwpCt1u5QQvp. | 2024-09-06 08:33:02 |
+----+-------------+------------------------+--------------------------------------------------------------+---------------------+
1 row in set (0.00 sec)

mysql> 

 

标签:autocommit,files,set,option,globally,Disable,mysql,+----+-------------+---------
From: https://www.cnblogs.com/zhangzhihui/p/18401408

相关文章

  • 004.Vue3入门,使用绑定属性时undefined和disabled用法
    1、代码如下:<template><divv-bind:id="myId1"v-bind:class="testCls">测试1</div><divv-bind:id="myId2"v-bind:title="testTitle">测试2</div><div:id="myId3":class="te......
  • vue el-button disabled没有实时生效
    在el-table中,操作按钮中el-button按钮置灰的操作,disable不生效是加了v-if判断,解决方法是添加key="1"<el-table-columnfixed="right"align="center"label="操作"><templateslot-scope="scope">......
  • 通天星CMSV6车载视频监控平台 disable存在SQL注入漏洞
    一、漏洞简介通天星CMSV6车载视频监控平台是东莞市通天星软件科技有限公司研发的监控平台,通天星CMSV6产品覆盖车载录像机、单兵录像机、网络监控摄像机、行驶记录仪等产品的视频综合平台。通天星科技应用于公交车车载、校车车载、大巴车车载、物流车载、油品运输车载、警车......
  • xctf smarty 利用 LD_PRELOAD 环境变量绕过disable_functions
    进来看页面一眼看出为smarty注入,尝试查看smarty版本再进行下一步操作。可以看到是3.1.30那么就可以利用if标签来进行注入。利用file_put_contents上传木马。接下来蚁剑访问,发现没有权限,想到可能需要绕过disable_functions,而绕过disable_functions就那么几种,尝试利用LD_PRELOAD......
  • redisson WRONGPASS invalid username-password pair or user is disable
    1、技术架构:若依微服务框架<dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-alibaba-dependencies</artifactId><version>2021.1</version></dependency><dependency>......
  • RCTF 2019]Nextphp 利用phpFFI来绕过 disable_functions限制
    今天做了一道RCE+反序列化的题目,看看吧。进入题目就给出了源码点击查看代码<?phpif(isset($_GET['a'])){eval($_GET['a']);}else{show_source(__FILE__);}Rce看看,发现许多函数都被dis掉了,试试无参数rce。发现了当前目录的一些文件(1.txt是我弄上去的,......
  • CTFHUB-PHP-bypass_disable_functions
    很多可以蚁剑插件自己做,因为本来就是蚁剑实验室的靶场,这里有些也就用手工方法,方便掌握原理。LD_PRELOAD看题目一眼环境变量劫持。蚁剑可以连,但是终端命令全被ban了。访问/?ant=phpinfo();查看禁用函数:pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,......
  • MBIST和BISR+循环移位和强制转换+verdi操作+vip需要disable auto recording+vim设置某
    MBIST和BISRhttps://blog.csdn.net/liubin1222/article/details/103995449https://zhuanlan.zhihu.com/p/161185302进行内存修复需要两步:首先在可修复内存测试期间,由MBIST控制器诊断出的故障。第二步是修复内存,确认修复签名。可修复的存储器都有带修复签名的寄存器。MBIST(Me......
  • Running the installer as administrator is disabled by default, see https://githu
    在windows安装scoops提示 网上找到解决办法安装失败-安装scoop失败:“默认情况下,以管理员身份运行安装程序处于禁用状态,请参阅https://github.com/ScoopInstaller/Install#for-admin”-堆栈溢出---failedinstallation-Installingscoopfails:"Runningtheinstal......
  • Vue日期选择器里面进行disabledDate(time)进行调用
    题主首先参照别人的写法,写在里面,但是发现disabledDate一直是灰色调用不成功,后来进行别的参考pickerOptions:{disabledDate(time){returntime.getTime()<Date.now()-8.64e7;//如果没有后面的-8.64e7就是不可以选择今天的},}, ......