当前位置:网站首页> 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开启日志内容请搜索软件开发网以前的文章或继续浏览下面的相关文章希望大家以后多多支持软件开发网!
边栏推荐
- Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medi
- three. JS gorgeous bubble effect
- Dayu200 experience officer runs the intelligent drying system page based on arkui ETS on dayu200
- UVa 11732 – strcmp() Anyone?
- Enterprises do not want to replace the old system that has been used for ten years
- Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
- 树的先序中序后序遍历
- [unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files
- CRMEB商城系统如何助力营销?
- ACL 2022 | small sample ner of sequence annotation: dual tower Bert model integrating tag semantics
猜你喜欢

自定义 swap 函数

Improving Multimodal Accuracy Through Modality Pre-training and Attention

Matlab tips (27) grey prediction

Traversal of a tree in first order, middle order, and then order

Word2vec (skip gram and cbow) - pytorch

ACL 2022 | 序列标注的小样本NER:融合标签语义的双塔BERT模型

【Unity】升级版·Excel数据解析,自动创建对应C#类,自动创建ScriptableObject生成类,自动序列化Asset文件

ACL 2022 | small sample ner of sequence annotation: dual tower Bert model integrating tag semantics

Machine test question 1

欧洲生物信息研究所2021亮点报告发布:采用AlphaFold已预测出近1百万个蛋白质
随机推荐
2014 Alibaba web pre intern project analysis (1)
视图(view)
云原生技术--- 容器知识点
Dealing with the crash of QT quick project in offscreen mode
Pit encountered by handwritten ABA
Aardio - integrate variable values into a string of text through variable names
企业不想换掉用了十年的老系统
Windows auzre background operation interface of Microsoft's cloud computing products
DR-Net: dual-rotation network with feature map enhancement for medical image segmentation
Is "applet container technology" a gimmick or a new outlet?
Adavit -- dynamic network with adaptive selection of computing structure
Sword finger offer question brushing record 1
Method of canceling automatic watermarking of uploaded pictures by CSDN
On the problems of born charge and non analytical correction in phonon and heat transport calculations
Is there any requirement for the value after the case keyword?
Word2vec (skip gram and cbow) - pytorch
BasicVSR_PlusPlus-master测试视频、图片
memcached
浅谈网络安全之文件上传
cuda 探索