当前位置:网站首页>Docker installs mysql5.7 and starts binlog
Docker installs mysql5.7 and starts binlog
2022-06-28 05:19:00 【qq_ forty-one million eighty-four thousand four hundred and thi】
install
docker pull mysql:5.7Create a folder for storing mappings
mkdir -p /mydata/mysql/log
mkdir -p /mydata/mysql/data
mkdir -p /mydata/mysql/conffunction mysql
docker run --name mysql5.7 -e MYSQL_ROOT_PASSWORD=123456 -d -v /mydata/mysql/log:/var/log/mysql -v /mydata/mysql/data:/var/lib/mysql -v /mydata/mysql/conf:/etc/mysql -p 8001:3306 mysql:5.7
Turn on binlog(5.7 Not on by default ,8 Default on )
Create two new profiles
cd /mydata/mysql/conf
touch my.cnf
touch my.confBe careful my.cnf The permission of cannot be opened too large , No, it will be mysql Ignore
chmod 664 that will do , open 777 Will be ignored
![]()
Modify the configuration file
1、my.conf file
vim my.conf[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
skip-name-resolve:wq!2、my.cnf
vim my.cnf[mysqld]
log-bin=/var/lib/mysql/mysql-bin
server-id=123654
expire_logs_days = 30:wq!restart mysql
docker restart mysql5.7verification

show variables like 'log_bin';
show variables like 'binlog_format';边栏推荐
- !‘cat‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
- QCOM LCD调试
- 学习太极创客 — MQTT 第二章(四)ESP8266 保留消息应用
- 电源插座是如何传输电的?困扰小伙伴这么多年的简单问题
- Hundreds of lines of code to implement a script interpreter
- Rxswift -- (1) create a project
- Simple usage of GSAP
- Operation of 2022 power cable judgment question simulation examination platform
- 基于订单流工具,我们能看到什么?
- mysql导出数据库字典成excel文件
猜你喜欢

How to do a good job of gateway high availability protection in the big promotion scenario

Carboxylic acid study: lumiprobe sulfoacyanine 7 dicarboxylic acid

wordpress zibll子比主题6.4.1开心版 免授权

基于订单流工具,我们能看到什么?

Docker安装Mysql5.7并开启binlog

CpG solid support research: lumiprobe general CpG type II

Learn Taiji Maker - mqtt Chapter 2 (IV) esp8266 reserved message application

Wedding studio portal applet based on wechat applet

Extjs图书管理系统源码 智能化图书管理系统源码

2022新版nft源码中国元宇宙数字藏品艺术品交易平台源码
随机推荐
BioVendor sRAGE抗体解决方案
RxSwift --(1)创建一个项目
[microservices openfeign] openfeign quick start service invocation based on feign
Lumiprobe cell imaging analysis: PKH26 cell membrane labeling kit
How high is the gold content of grade II cost engineer certificate? Just look at this
2022年全国最新消防设施操作员(初级消防设施操作员)模拟题及答案
禁用右击、键盘打开控制台事件
The short video local life section has become popular. How to grasp the new opportunities?
gorm事务体验
BioVendor sRAGE Elisa试剂盒化学性质和技术研究
Redis 的 最新windows 版本 5.0.14
Extjs图书管理系统源码 智能化图书管理系统源码
CpG solid support research: lumiprobe general CpG type II
Amino dye research: lumiprobe fam amine, 6-isomer
MySQL export database dictionary to excel file
How to learn programmable logic controller (PLC)?
高通平台 Camera 之 MCLK 配置
使用class toplevel的messagebox时,窗口弹出问题。
刘海屏手机在部分页面通过[[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom得到底部安全区高度为0问题
Voltage mode and current mode control of switching power supply