From 322b19d33e5b015f842ec3501b03beb45c92991c Mon Sep 17 00:00:00 2001 From: "YUN-PC5\\user" Date: Mon, 29 Jan 2024 17:48:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/_posts/Linux.md | 24 +++++++++++++++++++++++- source/_posts/MySQL.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/source/_posts/Linux.md b/source/_posts/Linux.md index 3eaaaef..0c674d4 100644 --- a/source/_posts/Linux.md +++ b/source/_posts/Linux.md @@ -1287,9 +1287,31 @@ echo $SHELL ### 主题 -- Powerlevel10K +#### Powerlevel10K ```shell + +``` + +安装Nerd Fonts + +```shell +unzip nerd-fonts.zip + +``` + +运行install.sh提示/usr/bin/env: ‘bash\r’: No such file or directory + +```shell +vim install.sh + +:set ff +# 可以看到fileformat=dos + +:set ff=unix +:set ff +# 可以看到fileformat=unix 即保存成功 +:wq ``` diff --git a/source/_posts/MySQL.md b/source/_posts/MySQL.md index ec9d6a6..4c8c066 100644 --- a/source/_posts/MySQL.md +++ b/source/_posts/MySQL.md @@ -484,6 +484,40 @@ start slave; 就是server-id 没有配置成功的原因,需要重新修改配置文件,复制配置文件到容器里面,然后重启就ok +# 二进制日志文件(binlog) + +## 查看是否开启 + +```mysql +SHOW VARIABLES LIKE 'log_bin'; +``` + +## 配置 + +```mysql +[mysqld] +# 开启binlog +log_bin=ON +# binlog日志的基本文件名 +#log_bin_basename=/var/lib/mysql/mysql-bin +# binlog文件的索引文件, 管理所有binlog文件 +#log_bin_index=/var/lib/mysql/mysql-bin.index +# 配置serverid +server-id=1 +# 设置日志三种格式: STATEMENT、ROW、MIXED。 +binlog_format=mixed +# 设置binlog清理时间 +expire_logs_days=15 +# binlog每个日志文件大小 +max_binlog_size=100m +# binlog缓存大小 +binlog_cache_size=4m +# 最大binlog缓存大小 +max_binlog_cache_size=512m +``` + + + # MyCat 2 ## 安装