当前位置:网站首页>Docker installing MySQL
Docker installing MySQL
2022-06-11 20:33:00 【cpuCode】
Docker install MySQL
docker operation
https://blog.csdn.net/qq_44226094/article/details/120624387
install MySQL
Pull MySQL
sudo docker pull mysql:5.7
function MySQL
- –name Specify container name
- -v Directory mount
- -p Specify port mapping , The container of 3306 Port mapping to host's 3306 port
- -e Set up mysql Parameters MYSQL_ROOT_PASSWORD : initialization root The user's password is
- -d Background operation
sudo docker run -p 3306:3306 --name mysql \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=cpucode \
-d mysql:5.7
Get into MySQL
docker exec -it mysql bin/bash
sign out
exit
Because there are directory mappings , So we can execute directly outside the image
vim Modify the configuration file
vim /mydata/mysql/conf/my.conf

Set up MySQL Parameters
[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
Dokcer restart MySQL service
docker restart mysql

Set up along with docker Start autorun
docker update mysql --restart=always

边栏推荐
- 2022-2028 global and Chinese thermal conductivity hydrogen analyzer Market Status and future development trend
- Capriccio in the Internet Age
- Modify appid of local wechat applet
- Two minutes to show you the charging standard of the Sub Ledger System
- Object storage of CEPH distributed storage
- 27. this pointing problem
- Modelarts second job
- 银泰百货与淘宝天猫联合打造绿色潮玩展,助力“碳中和”
- 浅聊对比学习(Contrastive Learning)第一弹
- A brief talk on shutter button
猜你喜欢

10 R vector operation construction

周鸿祎:想做直播带货抹不下面子 数据勒索成突出的安全威胁

First modelarts training

Richter's substitution principle

unity package manager starting server stuck(Unity启动卡在starting server,然后报错)

QQ贴吧那种图片一点开,就变了的原理

Installation and performance test of Apache APIs IX on Amazon graviton3

秀创意,赢显卡!MMPose姿态估计创意大赛震撼来袭

Two minutes to show you the charging standard of the Sub Ledger System

Lanqi technology joins in, and dragon dragon dragon community welcomes leading chip design manufacturers again
随机推荐
导师转我800块,让我仿真一个电路(电源设计)
Google proposed the super pre training model coca, and the accuracy of fine-tuning top-1 on Imagenet reached 91%! SOTA! On multiple downstream tasks
Lanqi technology joins in, and dragon dragon dragon community welcomes leading chip design manufacturers again
STL container nested container
7905 和TL431 负电压稳压电路 - 相对于电源正极的稳压和浮地电路
Current situation and future development trend of global and Chinese cogeneration system market from 2022 to 2028
2022-2028 global and Chinese thermal power generation (TEG) module market status and future development trend
Richter's substitution principle
Power supply anti reverse connection and anti backflow - use MOS tube and op amp to realize ideal diode
Modelarts second job
28. JS implementation mechanism
unity里面使用opencv,qt建立plugin(一)
Gestionnaire de paquets d'Unit é Starting Server Stuck
moderlarts第一次培訓
Date of SQL optimization_ Format() function
A Mechanics-Informed Artificial Neural Network Approach in Data-Driven Constitutive Modeling 学习
输入值“18-20000hz”错误,设置信息不完整,请选择单位
Flutter doctor 显示xcode没有安装的解决办法
VS2010 cannot open when linking sql2008 database
里氏替换原则