随笔分类 -  MySQL

死锁分析-(using intersect多个索引引发死锁)
摘要:MySQL: 8.0.32 参考:https://www.modb.pro/db/646651 线上有一个SQL偶然报出死锁信息,是一类根据唯一ID和status进行更新的SQL。 age是唯一字段,理论上来说根据唯一字段更新不应该出现死锁,但在update执行计划中发现,并不止使用了age索引,还 阅读全文

posted @ 2024-12-23 15:32 柴米油盐酱醋 阅读(25) 评论(0) 推荐(0) 编辑

MYSQL死锁分析案例二(高并发增删改同一条记录)
摘要:1、建表 CREATE TABLE `t1` ( `id` int NOT NULL, `name` varchar(200) DEFAULT NULL, `age` int DEFAULT NULL, PRIMARY KEY (`id`), KEY `idx111` (`name`), KEY ` 阅读全文

posted @ 2024-08-07 11:10 柴米油盐酱醋 阅读(72) 评论(0) 推荐(0) 编辑

mysql8 根据ibd文件恢复表
摘要:原文 https://github.com/ddcw/ibd2sql 环境:mysql 8.0.33 一、创建测试数据 Mysql8.0.32环境: mysql> create table t1(id int ,name varchar(200)); Query OK, 0 rows affecte 阅读全文

posted @ 2024-05-08 14:08 柴米油盐酱醋 阅读(281) 评论(0) 推荐(0) 编辑

mysql 5.7安装mariadb审计插件
摘要:官方文档:https://mariadb.com/kb/en/mariadb-audit-plugin/参考文档:https://segmentfault.com/a/1190000042056617 下载10.5版本的 mariadb ,再高的版本不适合5.7 1、下载mariadb 下载界面: 阅读全文

posted @ 2024-03-07 15:57 柴米油盐酱醋 阅读(98) 评论(0) 推荐(0) 编辑

mysqlsh备份恢复小记
摘要:参考文档: https://mp.weixin.qq.com/s/SGWgecxrpLNhnQzQMwh_Ew https://opensource.actionsky.com/20221012-mysql/ https://blog.csdn.net/m0_67261762/article/det 阅读全文

posted @ 2023-11-30 14:34 柴米油盐酱醋 阅读(291) 评论(0) 推荐(0) 编辑

MySQL更换内存分配器
摘要:操作系统环境:ubuntu 20 (arm 架构) 数据库版本:MySQL 5.7 (arm 架构) 1、查看当前 MySQL 使用内存分配器 ps -ef|grep mysqld 获取 mysqld 进程号,结果没有 jemalloc 或 tcmalloc。默认是 glibc 内存分配器。 roo 阅读全文

posted @ 2023-10-18 09:51 柴米油盐酱醋 阅读(565) 评论(0) 推荐(0) 编辑

CFG file is missing and source table is found to have row versions报错原因分析
摘要:参考: https://docs.percona.com/percona-xtrabackup/8.0/error-message-instant.html https://dev.mysql.com/doc/refman/8.0/en/innodb-table-import.html https: 阅读全文

posted @ 2023-08-30 19:18 柴米油盐酱醋 阅读(1156) 评论(4) 推荐(0) 编辑

ddl锁表统计
摘要:官方文档: https://dev.mysql.com/doc/refman/5.7/en/innodb-online-ddl-operations.html 虽然官方统计了大部分DDL操作时,是否允许DML,但并不是很全,或者有些支持DML,但仅仅只支持查询,不支持增删改操作。 版本:MySQL 阅读全文

posted @ 2023-02-09 18:28 柴米油盐酱醋 阅读(61) 评论(0) 推荐(0) 编辑

mysql压缩表小记
摘要:参考文档: https://www.163.com/dy/article/GI4CH5N305319P76.html https://learn.lianglianglee.com/%E4%B8%93%E6%A0%8F/MySQL%E5%AE%9E%E6%88%98%E5%AE%9D%E5%85%B 阅读全文

posted @ 2023-02-08 20:39 柴米油盐酱醋 阅读(377) 评论(0) 推荐(0) 编辑

MySQL半一致读实验
摘要:参考资料: https://dev.mysql.com/doc/refman/8.0/en/innodb-transaction-isolation-levels.html https://www.yisu.com/zixun/262123.html 1、实验环境 MySQL 5.7 RC隔离级别 阅读全文

posted @ 2022-12-26 17:41 柴米油盐酱醋 阅读(212) 评论(0) 推荐(0) 编辑

infobin(binlog分析工具)
摘要:infobin 参考github:https://github.com/gaopengcarl/infobin使用前自己随便写了一些数据,有大事务,长事务等。 1、安装[root@root ~]# git clone https://github.com/gaopengcarl/infobin 2、 阅读全文

posted @ 2022-10-12 18:29 柴米油盐酱醋 阅读(568) 评论(0) 推荐(0) 编辑

mysql-rocksdb安装
摘要:参考: https://zhuanlan.zhihu.com/p/382650024 https://developer.aliyun.com/article/655863 http://alexstocks.github.io/html/rocksdb.html 阅读全文

posted @ 2022-07-13 16:53 柴米油盐酱醋 阅读(213) 评论(0) 推荐(0) 编辑

performance_schema 杂记
摘要:1、参考资料: 官方文档:https://dev.mysql.com/doc/refman/8.0/en/performance-schema-quick-start.html 简书:https://www.jianshu.com/p/fb460ffdbce6 cbnlogs:https://www 阅读全文

posted @ 2022-07-05 15:14 柴米油盐酱醋 阅读(340) 评论(0) 推荐(0) 编辑

MySQL5.7压测SSL加密性能影响
摘要:###1、压测环境 操作系统:MAC电脑上虚拟出两个Linux(centos 7) 配置:2c2g 数据库版本:MySQL 5.7 vm1:安装 MySQL 5.7 数据库 vm2:安装 sysbench ###2、压测方法 https://help.aliyun.com/document_deta 阅读全文

posted @ 2022-06-25 23:29 柴米油盐酱醋 阅读(303) 评论(0) 推荐(0) 编辑

gdb调试mydumper排查警告信息根因
摘要:####问题背景: 在使用 mydumepr 0.9.5 版本备份云上数据库时,偶尔会有告警信息,几乎都是 sys 库的,其实也没有备份这个库,不知道为什么会去检测 sys 库,并且还有告警信息。 ** (mydumper:19312): WARNING **: Broken table detec 阅读全文

posted @ 2022-04-08 17:02 柴米油盐酱醋 阅读(371) 评论(0) 推荐(0) 编辑

vscode 搭建mysql源码调试环境(转)
摘要:转载: https://www.modb.pro/db/111795 操作系统:MAC OS 11.5.2 MySQL源码版本:8.0.26 VSCode版本: 1.60.0 1、编译安装MySQL 1、MySQL源码下载,建议下载自带boost的版本 https://cdn.mysql.com// 阅读全文

posted @ 2022-03-10 22:42 柴米油盐酱醋 阅读(963) 评论(0) 推荐(0) 编辑

HAproxy端口转发到Mysql
摘要:参考文档: https://blog.51cto.com/chenql/1898713http://www.ttlsa.com/linux/haproxy-study-tutorial 配置文件: [root@mysql haproxy]# cat haproxy.cfg global log 12 阅读全文

posted @ 2022-01-24 18:59 柴米油盐酱醋 阅读(495) 评论(0) 推荐(0) 编辑

my2sql 安装使用(回滚,分析大事务长事务)
摘要:官方github https://github.com/liuhr/my2sql 1、安装 本想用源码安装,但一直报错,后来直接下载的二进制文件 wget https://raw.githubusercontent.com/liuhr/my2sql/master/releases/centOS_re 阅读全文

posted @ 2022-01-17 20:15 柴米油盐酱醋 阅读(1007) 评论(0) 推荐(1) 编辑

MySQL误区一(max_connect_errors 参数)
摘要:转载: https://developer.aliyun.com/article/159612?spm=a2c6h.13262185.0.0.4211ea3cYu6xOi 阅读全文

posted @ 2022-01-17 11:00 柴米油盐酱醋 阅读(56) 评论(0) 推荐(0) 编辑

MySQL杂记--select 权限范围变更史
摘要:前言: 在5.7版本中无意间发现,只有 select 权限的用户,是可以执行 select ... for update / select ... lock in share mode 命令的,一时想不出在什么场景下,会存在只有 select 权限的用户,需要对记录加锁操作, 复现: session 阅读全文

posted @ 2022-01-15 17:02 柴米油盐酱醋 阅读(323) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示