MySQL DBA MySQL目录结构(五)

MySQL目录结构

basedir

datadir

索引和数据在同一个表空间里面

redo、error log、undo(ibdata1)、slow log

监控error log

cp error.log  /path/error.log

diff error.log  /path/error.log

slow log

pt-query-digest/mysqldumpslow

一、数据库中有多少sql在调用

statement_analysis

select count(*) from statement_analysis

二、慢日志大小

三、binlog

dcl、ddl明文存储

dml加密格式存储

mysqlbinlog -v --base64-output=decode-rows mysql-bin.xxxx  (base64-output不带原始语句了)

dml都可以利用binlog闪回(带原始数据)

ddl不能闪回

DCL,DDL->statement

DML->row格式

reset slave;

enterprise backup

thread-pool

审计

general log

5.7 query_rewrite_plugin拦截SQL转储远程elk

二进制日志维护

expire

purge

help show;

show table;

show table status;

show open tables;

剪裁数据库

备份(程序)->rm->cp /path/mysqld .

ldd mysqld

strip mysqld

猜你喜欢

转载自www.cnblogs.com/geek-ace/p/11110768.html