当前位置:网站首页>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';边栏推荐
- Question bank and answers of 2022 materialman general basic (materialman) operation certificate examination
- Wireless sensor network learning notes (I)
- Leetcode 88: merge two ordered arrays
- BioVendor sRAGE Elisa试剂盒化学性质和技术研究
- Store inventory management system source code
- The short video local life section has become popular. How to grasp the new opportunities?
- Informatics Orsay all in one 1360: strange lift
- Keil C51的Data Overlaying机制导致的函数重入问题
- 乔布斯在斯坦福大学的演讲稿——Follow your heart
- Study on modified triphosphate: lumiprobe amino-11-ddutp
猜你喜欢
![[JVM series] JVM tuning](/img/e1/086f76ec6c9b56d97430b1e073f5a6.png)
[JVM series] JVM tuning

Based on the order flow tool, what can we see?

【牛客网刷题系列 之 Verilog快速入门】~ 四选一多路器

The latest examination questions and answers for the eight members (standard members) of Liaoning architecture in 2022

How to learn programmable logic controller (PLC)?

机器人学DH参数及利用matlab符号运算推导

Latest Windows version 5.0.14 of redis

JS text box loses focus to modify width text and symbols

开关电源电压型与电流型控制

2022年全国最新消防设施操作员(初级消防设施操作员)模拟题及答案
随机推荐
Qcom LCD commissioning
How to learn programmable logic controller (PLC)?
Voltage mode and current mode control of switching power supply
CpG solid support research: lumiprobe general CpG type II
JS 文本框失去焦点修改全半角文字和符号
2022 high altitude installation, maintenance and removal examination questions and answers
Understanding the source of innovation II
The latest examination questions and answers for the eight members (standard members) of Liaoning architecture in 2022
【Linux】——使用xshell在Linux上安装MySQL及实现Webapp的部署
If a programmer goes to prison, will he be assigned to write code?
Based on the order flow tool, what can we see?
机器人学DH参数及利用matlab符号运算推导
[microservices openfeign] openfeign quick start service invocation based on feign
DPDK 源码测试时性能下降问题
刘海屏手机在部分页面通过[[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom得到底部安全区高度为0问题
Disable right-click, keyboard open console events
活性染料研究:Lumiprobe AF594 NHS 酯,5-异构体
Concurrent wait/notify description
Extjs图书管理系统源码 智能化图书管理系统源码
Extjs library management system source code intelligent library management system source code