Quick Start
Commands
Config Path mysql --help | grep -B 1 etc/my.cnf Default options are read from the following fil...
binlog
Show Variables SHOW VARIABLES LIKE 'log_bin'; +---------------+-------+ | Variable_name | Value...
Installation
MySQL Client 到 Oracle 官方 MySQL APT repo 下载配置包(最新版在 2025 之前是 0.8.33 这一支): wget https://dev.mysql....
Quick Count
使用最小覆盖索引 针对 InnoDB 表(几十万到几百万行)快速统计行数,可以有几个方法。下面按实用性和效率排序: 选择最窄的索引列(最好是整型或短列)进行扫描,不访问表数据页。 假设你有一...
Replica
Grant User CREATE USER 'repl'@'%' IDENTIFIED BY '123'; GRANT REPLICATION SLAVE, REPLICATION CLI...