当前位置:网站首页>Docker installs MySQL and successfully uses Navicat connection
Docker installs MySQL and successfully uses Navicat connection
2022-07-03 07:50:00 【A reserved and calm man】
1. install docker
Centos7 install Docker
yum install docker-ce
Use Docker China Accelerator , because Docker It's foreign , There is a powerful firewall
vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://rsyrgxsw.mirror.aliyuncs.com"]
}
Restart docker
systemctl restart docker
see docker Version information
docker version
Client:
Version: 17.12.1-ce
API version: 1.35
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:15:20 2018
OS/Arch: linux/amd64
Server:
Engine:
Version: 17.12.1-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:17:54 2018
OS/Arch: linux/amd64
Experimental: false
2. install mysql
First download mysql Mirror image
docker pull mysql
Start with the command under the directory created above mysql Containers
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:latest
View the running container
docker images -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
821aca9bf102 mysql:latest "docker-entrypoint.s…" 38 minutes ago Up 19 minutes 0.0.0.0:3306->3306/tcp, 33060/tcp mysql
Enter the running container
docker exec -it 821aca9bf102 /bin/bash
Get into mysql
mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 8.0.18 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
3. To configure navicat Connect
mysql8 after , Strong encryption rule selected during installation caching_sha2_password, And previous mysql5.7 Of mysql_native_password The rules are different ,navicate The driver currently does not support new encryption rules , The following configuration is required .
alter user 'root'@'%' identified with mysql_native_password by '123456';// Change the encryption method
flush privileges;// Refresh
边栏推荐
- C2-关于VCF文件合并的几种方法
- [at] abc 258G - Triangle 三元組可達-暴力
- Project experience sharing: handwritten Chinese character recognition based on Shengsi mindspire
- go语言-循环语句
- UA camouflage, get and post in requests carry parameters to obtain JSON format content
- Harmonyos third training notes
- PAT甲级 1032 Sharing
- Go language foundation ----- 13 ----- file
- 华为交换机:配置telnet和ssh、web访问
- Go language foundation ----- 15 ----- reflection
猜你喜欢
An article for you to understand - Manchester code
Go language foundation ----- 16 ----- goroutine, GPM model
Go language foundation ----- 07 ----- method
什么是数据类型?数据类型有什么用?
[MySQL 11] how to solve the case sensitive problem of MySQL 8.0.18
Project experience sharing: realize an IR Fusion optimization pass of Shengsi mindspire layer
Worldview satellite remote sensing image data / meter resolution remote sensing image
【MySQL 14】使用DBeaver工具远程备份及恢复MySQL数据库(Linux 环境)
How can entrepreneurial teams implement agile testing to improve quality and efficiency? Voice network developer entrepreneurship lecture Vol.03
创业团队如何落地敏捷测试,提升质量效能?丨声网开发者创业讲堂 Vol.03
随机推荐
Technical dry goods Shengsi mindspire innovation model EPP mvsnet high-precision and efficient 3D reconstruction
LwIP learning socket (API)
Differences between tp3.2 and tp5.0
Huawei switch basic configuration (telnet/ssh login)
技术干货|昇思MindSpore NLP模型迁移之LUKE模型——阅读理解任务
Analysis of the eighth Blue Bridge Cup single chip microcomputer provincial competition
PAT甲级 1030 Travel Plan
Technical dry goods | Bert model for the migration of mindspore NLP model - text matching task (2): training and evaluation
Analysis of the ninth Blue Bridge Cup single chip microcomputer provincial competition
Project experience sharing: Based on mindspore, the acoustic model is realized by using dfcnn and CTC loss function
[step on the pit series] MySQL failed to modify the root password
Huawei s5700 switch initialization and configuration SSH and telnet remote login methods
项目经验分享:基于昇思MindSpore,使用DFCNN和CTC损失函数的声学模型实现
Client server model
Go language foundation ------ 14 ------ gotest
Huawei switch console password reset, device initialization, default password
密西根大学张阳教授受聘中国上海交通大学客座教授(图)
创业团队如何落地敏捷测试,提升质量效能?丨声网开发者创业讲堂 Vol.03
Huawei s5700 switch initialization and configuration Telnet, SSH user methods
优质博客——