当前位置:网站首页>Docker deployment MySQL 8
Docker deployment MySQL 8
2022-07-01 01:18:00 【linmengmeng_ one thousand three hundred and fourteen】
Docker Deploy MySQL 8
1. Pull the mirror image
Go directly to dockerhub Just go , Find the image version you want :https://hub.docker.com/_/mysql
Pull the mirror image :docker pull mysql:8
I'm going to use it directly here 8
, Then use the above command , If you choose another tag
, Replace it directly .
2. Start the container and mount the directory
docker run --restart always \
--name mysql8 \
-p 3307:3306 \
-p 33070:33060 \
-v /usr/soft/mysql-3307/mysql-files:/var/lib/mysql-files \
-v /usr/soft/mysql-3307/data:/var/lib/mysql \
-v /usr/soft/mysql-3307/conf.d:/etc/mysql/conf.d \
-v /usr/soft/mysql-3307/etc.mysql:/etc/mysql \
-e MYSQL_ROOT_PASSWORD= abc23456\
-d mysql:8 \
--character-set-server=utf8mb4 \
--collation-server=utf8mb4_general_ci \
--default_authentication_plugin=mysql_native_password
here -e MYSQL_ROOT_PASSWORD
Direct designation root password :abc23456
abnormal
1. Unmounted directory /var/lib/mysql-files
Error message :
Failed to access directory for --secure-file-priv. Please make sure that directory exists and is accessible by MySQL Server. Supplied value : /var/lib/mysql-files
When the container is started , Add mount directory :-v /usr/soft/mysql-3307/mysql-files:/var/lib/mysql-files
2. Navicat Connection error :2059-Authentication plugin caching_sha2_password
cannot be load…
Configure the container with parameters :--default_authentication_plugin=mysql_native_password
At the end of the command to start the container , Add this parameter .
After this change , Although it can start normally , But look at the log , There's a reminder :
2022-06-28T10:01:24.463764Z 0 [Warning] [MY-010101] [Server] Insecure configuration for --secure-file-priv: Location is accessible to all OS users. Consider choosing a different directory.
2022-06-28T10:01:24.463859Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2022-06-28T10:01:24.463892Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 1
2022-06-28T10:01:24.465571Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2022-06-28T10:01:24.465595Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2022-06-28T10:01:24.473710Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
You can see Tip... Is not recommended , This can be changed to :
--character-set-server=utf8mb4 \
--collation-server=utf8mb4_general_ci \
边栏推荐
- [2023 MediaTek approved the test questions in advance] ~ questions and reference answers
- ORB-SLAM2源码学习(二)地图初始化
- 孔乙己第一问之服务通信知多少?
- 解决IDEA:Class ‘XXX‘ not found in module ‘XXX‘
- Technical personnel advanced to draw a big picture of business, hand-in-hand teaching is coming
- Chapter 53 overall understanding of procedures from the perspective of business logic implementation
- TCP三次握手为什么不是两次或四次
- 自定义注解实现校验
- Oracle data integrity
- Dls-42/6-4 dc110v double position relay
猜你喜欢
DLS-20型双位置继电器 220VDC
写给 5000 粉丝的一封信!
High quality pump SolidWorks model material recommended, not to be missed
Vnctf 2022 cm CM1 re reproduction
Sword finger offer 19 Regular Expression Matching
HDU 2488 A Knight's Journey(DFS)
Win11安装redis 数据库以及redis desktop manager的下载
Oracle table creation and management
Green, green the reed. dew and frost gleam.
C#生成putty格式的ppk文件(支持passphrase)
随机推荐
【学习笔记】构造
Is the public read-only field with immutable structure valid- Does using public readonly fields for immutable structs work?
Q弹松软的大号吐司,带来更舒服的睡眠
Exploring the road of steam education innovation in the Internet Era
NE555 waveform generator handle tutorial NE555 internal structure (I)
XJY-220/43AC220V静态信号继电器
pytorch编程知识(2)
探索互联网时代STEAM教育创新之路
Some views on libco
How to scroll uitableview to a specific position - how to scroll uitableview to specific position
Web interface testing of software testing
Impact relay zc-23/dc220v
ArrayList analysis 1-cycle, capacity expansion, version
C # generates PPK files in putty format (supports passphrase)
Using C language to realize the exchange between the contents of two arrays (provided that the array is the same size)
DLS-42/6-4 DC110V双位置继电器
Orb-slam2 source code learning (II) map initialization
集群与LVS介绍及原理解析
K210 site helmet
A letter to 5000 fans!