摘要:
直接复制执行 1、查询所有数据库占用磁盘空间大小 select TABLE_SCHEMA, concat(truncate(sum(data_length)/1024/1024,2),' MB') as data_size, concat(truncate(sum(index_length)/102 阅读全文
摘要:
grep -Rn "要查找的文件内容" (可选 文件路径) 阅读全文
摘要:
一、初级用法 git revert 撤销某次操作,此次操作之前和之后的commit和history都会保留,并且把这次撤销,作为一次最新的提交。 git revert HEAD 撤销前一次 commit git revert HEAD^ 撤销前前一次 commit git revert commit 阅读全文
摘要:
故障描述 在7月24日11点线上某数据库突然收到大量告警,慢查询数超标,并且引发了连接数暴增,导致数据库响应缓慢,影响业务。看图表慢查询在高峰达到了每分钟14w次,在平时正常情况下慢查询数仅在两位数以下,如下图: 赶紧查看慢SQL记录,发现都是同一类语句导致的慢查询(隐私数据例如表名,我已经隐去): 阅读全文
摘要:
22.回响科技一面 1.kafka多个分区怎么保证消息顺序 (1)首先发送消息可以通过指定key+单分区实现 (2)多个消费者消费的时候,可以自己对key取模,放入到队列中, 开多线程去消费这些队列。队列内是有序的 2.mysql在没有隔离级别的情况下,多线程修改一行数据可以吗 (1)隔离级别是为了 阅读全文
摘要:
ALTER TABLE table_name AUTO_INCREMENT= 1; 阅读全文
摘要:
撤销暂存区(index)区的track 当我们新增加文件时,使用git status会打印出: Untracked files: (use "git add <file>..." to include in what will be committed) hello.txt nothing adde 阅读全文
摘要:
1、查看php-fpm的进程个数 ps -ef |grep "php-fpm"|grep "pool"|wc -l2、查看每个php-fpm占用的内存大小 ps -ylC php-fpm --sort:rss3.查看PHP-FPM在你的机器上的平均内存占用 ps --no-headers -o "r 阅读全文
摘要:
Curl 纯文本格式输出: curl icanhazip.com curl ifconfig.me curl curlmyip.com curl ip.appspot.com curl ipinfo.io curl ipecho.net/plain curl www.trackip.net/i cu 阅读全文
摘要:
安装homebrew方法(若已经安装,忽略) /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 通过 brew 安装 brew install php@ 阅读全文