当前位置:网站首页>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';边栏推荐
- 【SkyWalking】一口气学完分布式链路追踪SkyWalking
- 如何从零设计一款牛逼的高并发架构(建议收藏)
- 使用class toplevel的messagebox时,窗口弹出问题。
- Prove that there are infinite primes / primes
- 深度强化学习笔记
- 【Linux】——使用xshell在Linux上安装MySQL及实现Webapp的部署
- Excel将一行的内容进行复制时,列与列之间是用制表符“\t”进行分隔的
- 2022 low voltage electrician examination questions and answers
- MySQL export database dictionary to excel file
- If a programmer goes to prison, will he be assigned to write code?
猜你喜欢

Docker安装Mysql5.7并开启binlog

Simulation questions and answers of the latest national fire-fighting facility operators (primary fire-fighting facility operators) in 2022

Operation of simulated examination platform of G3 boiler water treatment recurrent training question bank in 2022

分享一个因子挖掘的利器:遗传规划

BioVendor sRAGE蛋白解决方案

Feign通过自定义注解实现路径的转义

Carboxylic acid study: lumiprobe sulfoacyanine 7 dicarboxylic acid

Wedding studio portal applet based on wechat applet

【JVM系列】JVM调优

CpG solid support research: lumiprobe general CpG type II
随机推荐
Docker安装Mysql5.7并开启binlog
BioVendor sRAGE蛋白解决方案
Biovendor sRAGE protein solution
羧酸研究:Lumiprobe 磺基花青7二羧酸
Intensive learning notes
Study on chemical properties and technology of biovendor rage ELISA Kit
使用class toplevel的messagebox时,窗口弹出问题。
短视频本地生活版块成为热门,如何把握新的风口机遇?
Understanding the source of innovation II
程序员坐牢了,会被安排去写代码吗?
openssl客户端编程:一个不起眼的函数导致的SSL会话失败问题
Leetcode 88: merge two ordered arrays
JS 文本框失去焦点修改全半角文字和符号
开关电源电压型与电流型控制
metaRTC5.0编程之p2p网络穿透(stun)指南
How long will the PMP test results come out? You must know this!
【LeetCode】12、整数转罗马数字
[skywalking] learn distributed link tracking skywalking at one go
MySQL export query results to excel file
8VC Venture Cup 2017 - Elimination Round D. PolandBall and Polygon