mysql数据库运维常见问题_RDS数据库运维常用工具及常见问题

常用工具

1、日志管理、慢日志

2、CloudDBA功能

286766b2ff6c

3、数据管理DMS平台

286766b2ff6c

4、查看表空间大小select table_name, round(DATA_LENGTH/1024/1024/1024, 2) as data, round(INDEX_LENGTH/1024/1024/1024, 2) as idx_data, table_rows from tables where table_schema = 'exe_sf_p' order by data desc;

常见问题

1、Table 'exe_sf_t/#sql-ib27027' already exists

286766b2ff6c

2、Lock wait timeout exceeded; try restarting transactionSELECT * FROM information_schema.innodb_trx order by trx_started asc;

kill threadid删除Lock住最久的那个线程

4、语法效率问题宣导

参数化

查询字段索引

JOIN、IN

归档、分表:

条件中尽量能够过滤一些行将驱动表变得小一点,用小表去驱动大表

右表的条件列一定要加上索引(主键、唯一索引、前缀索引等),最好能够使type达到range及以上(ref,eq_ref,const,system)

一般不要用left join

explain

5、MySql Host is blocked because of many connection errors

6、主从同步延迟

show processlist

show slave status

重启RDS从库,避免RDS从库同步假死

7、The table '/home/mysql/data3003/tmp/#sql_25c8_2' is full

修改RDS的tmp_table_size参数

10、too many connections

show variables like '%max_connections%';

set global max_connections=1400;

11、The MySQL server is running with the --read-only option

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值