mysql个人使用记录

1. 查看配置文件位置

mysqld --verbose --help | grep -A 1 "Default options"

我这里输出如下:

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf

参考:
MySQL config file location - redhat linux server [closed]

2. 查看binlog

mysql> show binary logs;
+---------------+------------+-----------+
| Log_name | File_size | Encrypted |
+---------------+------------+-----------+
| master.000274 | 620987541 | No |
| master.000275 | 1073795141 | No |
| master.000276 | 1073802623 | No |
| master.000277 | 1073922736 | No |
| master.000278 | 1073895464 | No |
| master.000279 | 1073849251 | No |
| master.000280 | 1073809119 | No |
| master.000281 | 646395357 | No |
+---------------+------------+-----------+

mysql> select @@log_bin_basename;
+-----------------------------+
| @@log_bin_basename |
+-----------------------------+
| /usr/local/var/mysql/master |
+-----------------------------+

cd /usr/local/var/mysql 
mysqlbinlog --base64-output=decode --verbose master.000281 | head

参考:

posted @ 2021-10-10 11:52  成民  阅读(32)  评论(0编辑  收藏  举报