当前位置:网站首页>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';边栏推荐
- How high is the gold content of grade II cost engineer certificate? Just look at this
- Binary sort tree: BST
- Opencv实现颜色检测
- Extjs图书管理系统源码 智能化图书管理系统源码
- 2022年最新辽宁建筑八大员(标准员)考试试题及答案
- Gorm transaction experience
- Pcr/qpcr research: lumiprobe dsgreen is used for real-time PCR
- What is the difference between AC and DC?
- quartus 复制IP核
- Rxswift -- (1) create a project
猜你喜欢

The short video local life section has become popular. How to grasp the new opportunities?

Don't roll! How to reproduce a paper with high quality?

Keil C51的Data Overlaying机制导致的函数重入问题

【JVM】——JVM中内存划分

JS 文本框失去焦点修改全半角文字和符号

Sqlmap tool user manual

Quartus replication IP core

【JVM系列】JVM调优

【LeetCode】12、整数转罗马数字

Function reentry caused by Keil C51's data overlaying mechanism
随机推荐
Docker安装Mysql5.7并开启binlog
Excel将一行的内容进行复制时,列与列之间是用制表符“\t”进行分隔的
Quartus replication IP core
【牛客网刷题系列 之 Verilog快速入门】~ 四选一多路器
The short video local life section has become popular. How to grasp the new opportunities?
109. simple chat room 12: realize client-side one-to-one chat
开关电源电压型与电流型控制
如何从零设计一款牛逼的高并发架构(建议收藏)
How long will the PMP test results come out? You must know this!
[microservices openfeign] openfeign quick start service invocation based on feign
Realizing color detection with OpenCV
活性染料研究:Lumiprobe AF594 NHS 酯,5-异构体
Store inventory management system source code
Biovendor sRAGE protein solution
Extjs图书管理系统源码 智能化图书管理系统源码
mysql 导出查询结果成 excel 文件
改性三磷酸盐研究:Lumiprobe氨基-11-ddUTP
PMP考试成绩多久出来?这些你务必知道!
Gorm transaction experience
lotus v1.16.0 calibnet