Mysql统计信息处理及binlog解释

TODO

use db_name;
-- 分析表
ANALYZE TABLE table_name;
-- 查看表信息
select * from information_schema.TABLES where TABLE_SCHEMA = 'db_name' and TABLE_NAME = 'table_name' limit 10;
-- 查看索引
SHOW INDEX FROM table_name;

https://blog.csdn.net/boshuzhang/article/details/65632708

https://help.aliyun.com/document_detail/98819.html?spm=a2c4g.11186623.6.695.259b4c073n14a5

https://help.aliyun.com/knowledge_detail/41709.html?spm=5176.11065259.1996646101.searchclickresult.6ed539f0FSUMec

centos 安装mysql 5.6

https://www.cnblogs.com/renjidong/p/7047396.html

-- 查看mysql版本 (必须为5.6版本)
mysql --version
mysql Ver 14.14 Distrib 5.6.45, for Linux (x86_64) using EditLine wrapper

-- 如非5.6版本,必须先卸载,然后重装
-- 卸载
yum remove mysql
-- 安装
https://www.cnblogs.com/renjidong/p/7047396.html

-- 下载阿里云binlog日志
登陆后台,选择RDS实例,在控制台左侧选择 基本信息->备份恢复->日志备份,选择相应时间的日志下载,使用内网地址下载会快很多。
url='http://aliyuncs'
id="039929"
wget -c ${url} -O mysql-bin.${id}
mysqlbinlog -vv --base64-output=decode-rows mysql-bin.${id} >${id}
grep table_name ${id} >result_${id}

原文地址:https://www.cnblogs.com/chenzechao/p/11251974.html