当前位置:网站首页> docker中mysql开启日志的实现步骤
docker中mysql开启日志的实现步骤
2022-07-06 15:36:00 【1024问】
1.查看安mysql容器状态
2.进入容器内部
3.登录mysql数据库
4.查看binlog日志是否开启,查看后关闭mysql
5.编辑配置文件开启binlog,设置log文件
6.退出容器
7.重启mysql容器,且查看是否启动成功
8.查看binlog 日志状态是否开启
9.查看日志
1.查看安mysql容器状态 docker ps
docker exec -it 4ae9238c176a /bin/bash
mysql -uroot -p123456
查看:show variables like 'log_bin';
关闭:exit
备注:ON开启日志,OFF关闭日志
5.编辑配置文件开启binlog,设置log文件5.1 先在 /etc 文件夹下查找到 mysqld.cnf文件路径
find /etc -name mysqld.cnf
5.2 编辑mysqld.cnf文件
vim /etc/mysql/mysql.conf.d/mysqld.cnf
备注:如果没有vim 编译器 先安装vim编译器
apt-get updateapt-get install vim
备注:保证general_log_file 路径存在,(这是我的路径)若没有 则路径配置参考上面的log_error的配置路径
备注:添加后注意保存,保存,保存
6.退出容器exit
docker restart 4ae9238c176adocker ps
docker exec -it 4ae9238c176a /bin/bashmysql -uroot -p123456show variables like 'log_bin';exit
到此这篇关于docker中mysql开启日志的实现步骤的文章就介绍到这了,更多相关docker mysql开启日志内容请搜索软件开发网以前的文章或继续浏览下面的相关文章希望大家以后多多支持软件开发网!
边栏推荐
- 自定义 swap 函数
- #DAYU200体验官# 在DAYU200运行基于ArkUI-eTS的智能晾晒系统页面
- 做国外LEAD2022年下半年几点建议
- Bipartite graph determination
- MATLAB小技巧(27)灰色预测
- Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
- C# 三种方式实现Socket数据接收
- Matlab tips (27) grey prediction
- Plafond du tutoriel MySQL, bien collecté, regardez lentement
- memcached
猜你喜欢
Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medi
企業不想換掉用了十年的老系統
Matlab tips (27) grey prediction
【全网首发】Redis系列3:高可用之主从架构的
云原生技术--- 容器知识点
On file uploading of network security
Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medi
#DAYU200体验官# 在DAYU200运行基于ArkUI-eTS的智能晾晒系统页面
剑指offer刷题记录1
Slide the uniapp to a certain height and fix an element to the top effect demo (organize)
随机推荐
Return keyword
European Bioinformatics Institute 2021 highlights report released: nearly 1million proteins have been predicted by alphafold
CSDN 上传图片取消自动加水印的方法
Sizeof keyword
Advantages of link local address in IPv6
「小程序容器技术」,是噱头还是新风口?
uniapp滑动到一定的高度后固定某个元素到顶部效果demo(整理)
存币生息理财dapp系统开发案例演示
视图(view)
Volatile keyword
2022-07-05 stonedb sub query processing parsing time analysis
Let's see through the network i/o model from beginning to end
服务器的系统怎么选者
【编译原理】做了一半的LR(0)分析器
Slide the uniapp to a certain height and fix an element to the top effect demo (organize)
关于声子和热输运计算中BORN电荷和non-analytic修正的问题
Inno setup packaging and signing Guide
How to achieve text animation effect
2014阿里巴巴web前实习生项目分析(1)
Typescript get function parameter type