随笔分类 -  MySQL

1 2 3 4 5 ··· 11 下一页
摘要:MySQL的架构分成了server层和存储引擎层(storage engine),server层通过调用存储引擎层来返回数据。 1. Using index 表示查询的列被索引覆盖,因而无需回表查询,因而效率更高。2. Using index,Using where 表示查询的列被索引覆盖,且whe 阅读全文
posted @ 2024-12-19 14:41 __Yoon 阅读(149) 评论(0) 推荐(0) 编辑
摘要:按天查看表的增量数据:SELECT DATE(create_time) as date, COUNT(*) as daily_incrementFROM table_nameWHERE create_time >= '2024-01-01' AND create_time < '2024-12-16 阅读全文
posted @ 2024-12-19 11:27 __Yoon 阅读(8) 评论(0) 推荐(0) 编辑
摘要:1、下载canal安装包 canal.adapter-1.1.7.tar.gz canal.deployer-1.1.7.tar.gz 2、修改涉及的文件 canal_deployer: /conf/canal.properties /conf/example/instance.properties 阅读全文
posted @ 2024-08-21 18:41 __Yoon 阅读(461) 评论(0) 推荐(0) 编辑
摘要:通过命令,导出数据: SELECT * FROM users INTO OUTFILE '/tmp/users_data.sql' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; 通过脚本,转成insert语句: #!/bin/env pytho 阅读全文
posted @ 2024-07-18 19:04 __Yoon 阅读(110) 评论(0) 推荐(0) 编辑
摘要:在数据库管理平台Archery上定时任务执行DDL操作,第二天发现报错,报错信息如下: Error copying rows from `DB`.`TABLE_NAME` to `DB`.`_TABLE_NAME_new`: Threads_connected=1358 exceeds its cr 阅读全文
posted @ 2024-05-23 13:54 __Yoon 阅读(60) 评论(0) 推荐(0) 编辑
摘要:系统版本: CentOS Linux release 7.6.1810 (Core) 编译安装Python3.8.4 [root@hankyoon ~]# tar -xvf Python-3.8.4.tgz [root@hankyoon ~]# cd Python-3.8.4/ [root@hank 阅读全文
posted @ 2024-04-25 15:10 __Yoon 阅读(417) 评论(0) 推荐(0) 编辑
摘要:电话告警故障:MySQL 从库异常宕机。 查看MySQL error日志: [ERROR] Slave SQL for channel '': ... The slave coordinator and worker threads are stopped, possibly leaving dat 阅读全文
posted @ 2024-04-24 18:39 __Yoon 阅读(326) 评论(0) 推荐(0) 编辑
摘要:MySQL参数:slave_exec_mode 该参数与MySQL复制有关,它是一个动态修改的变量。默认为STRICT MODE(严格模式),可选值为IDEMPOTENT MODE(幂等模式)。设置为IDEMPOTENT模式可以防止从库出现1032(从库上不存在的键)和1062(需要重复键、主键或唯 阅读全文
posted @ 2024-04-23 11:33 __Yoon 阅读(310) 评论(0) 推荐(0) 编辑
摘要:项目地址: https://github.com/slowtech/slow-log-summary # wget https://github.com/slowtech/slow-log-summary/releases/download/v1.0.0/slow-log-summary-linux 阅读全文
posted @ 2023-11-22 14:31 __Yoon 阅读(238) 评论(0) 推荐(0) 编辑
摘要:一、通过sysbench创造测试数据 1、创造测试数据 [root@hankyoon db_tools]# sysbench --mysql-user=root --mysql-password='xxxxxx' --mysql-socket=/data/mysql/3307/mysql.sock 阅读全文
posted @ 2023-11-09 14:08 __Yoon 阅读(229) 评论(0) 推荐(0) 编辑
摘要:转自:https://mp.weixin.qq.com/s/FAFuazKdkguN0Awh_yr_lg 阅读全文
posted @ 2023-10-11 14:14 __Yoon 阅读(23) 评论(0) 推荐(0) 编辑
摘要:工具下载: https://github.com/hcymysql/pt-slave-repair pt-slave-repair 工具简介: MySQL主从复制作为一种常见的数据同步方式,有时候会出现同步错误导致同步中断的情况。手动修复这些同步错误通常需要耗费不少时间和精力,并且对于不熟悉MySQ 阅读全文
posted @ 2023-08-30 10:54 __Yoon 阅读(253) 评论(0) 推荐(0) 编辑
摘要:reverse_sql 是一个用于解析和转换 MySQL 二进制日志(binlog)的工具。它可以将二进制日志文件中记录的数据库更改操作(如插入、更新、删除)转换为反向的 SQL 语句,以便进行数据恢复。其运行模式需二进制日志设置为 ROW 格式。 reverse_sql工具是一个用于数据库恢复的工 阅读全文
posted @ 2023-07-20 10:50 __Yoon 阅读(878) 评论(0) 推荐(0) 编辑
摘要:错误日志如下: 1.replace into 的作用是,当存在冲突时,会把旧的记录替换成新的记录,也就是说replace into 分了两个步骤:A.判断 和 B. 执行 A. 首先判断我们执行的记录是否存在(根据主键或者唯一索引) B. 针对不存在的记录,直接执行insert语句 针对已经存在的记 阅读全文
posted @ 2023-04-06 15:05 __Yoon 阅读(560) 评论(0) 推荐(0) 编辑
摘要:详解转载: https://www.xmmup.com/mysql-shellgongjujieshao.html 下载: wget https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-8.0.29-linux-glibc2.12- 阅读全文
posted @ 2023-03-29 11:31 __Yoon 阅读(345) 评论(0) 推荐(0) 编辑
摘要:报错: FATAL: unable to connect to MySQL server on host '127.0.0.1', port 3377, aborting... FATAL: error 2059: Authentication plugin 'caching_sha2_passwo 阅读全文
posted @ 2023-02-13 11:32 __Yoon 阅读(549) 评论(0) 推荐(0) 编辑
摘要:转载: MySQL 8.0 新特性 阅读全文
posted @ 2023-02-06 16:54 __Yoon 阅读(16) 评论(0) 推荐(0) 编辑
摘要:转载: Clone Plugin 阅读全文
posted @ 2023-02-06 16:53 __Yoon 阅读(14) 评论(0) 推荐(0) 编辑
摘要:MySQL Load Data 多种用法 1、--导出基础参数 (以为,逗号作为分隔符,以"双引号作为界定符) select * into outfile '/data/mysql/3306/tmp/employees.txt' character set utf8mb4 fields termin 阅读全文
posted @ 2022-12-07 15:56 __Yoon 阅读(402) 评论(0) 推荐(0) 编辑
摘要:https://github.com/beekeeper-studio/beekeeper-studio 阅读全文
posted @ 2022-07-26 11:00 __Yoon 阅读(112) 评论(0) 推荐(0) 编辑

1 2 3 4 5 ··· 11 下一页
点击右上角即可分享
微信分享提示