当前位置:网站首页>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

边栏推荐
- PAT甲级 1030 Travel Plan
- Huawei switch: configure Telnet, SSH and web access
- Professor Zhang Yang of the University of Michigan is employed as a visiting professor of Shanghai Jiaotong University, China (picture)
- 什麼是定義?什麼是聲明?它們有何區別?
- Go language foundation ----- 18 ----- collaboration security, mutex lock, read-write lock, anonymous lock, sync Once
- 什么是定义?什么是声明?它们有何区别?
- Technical dry goods Shengsi mindspire dynamic transformer with variable sequence length has been released!
- 华为S5700交换机初始化和配置SSH和TELNET远程登录方法
- Go language foundation ----- 19 ----- context usage principle, interface, derived context (the multiplexing of select can be better understood here)
- Go language foundation ----- 04 ----- closure, array slice, map, package
猜你喜欢
随机推荐
EtherCAT state machine transition (ESM)
【cocos creator】点击按钮切换界面
Professor Zhang Yang of the University of Michigan is employed as a visiting professor of Shanghai Jiaotong University, China (picture)
Technical dry goods Shengsi mindspire innovation model EPP mvsnet high-precision and efficient 3D reconstruction
Iterm2设置
华为交换机Console密码重置、设备初始化、默认密码
Technical dry goods | Bert model for the migration of mindspore NLP model - text matching task (2): training and evaluation
Go language foundation ------ 14 ------ gotest
Redis批量启停脚本
Go language foundation ----- 07 ----- method
【LeetCode】2. Valid Parentheses·有效的括号
Go language foundation ----- 03 ----- process control, function, value transfer, reference transfer, defer function
Huawei switches are configured with SSH login remote management switches
Enter three times and guess a number
技术干货|昇思MindSpore可变序列长度的动态Transformer已发布!
Go language foundation ----- 18 ----- collaboration security, mutex lock, read-write lock, anonymous lock, sync Once
华为S5700交换机初始化和配置SSH和TELNET远程登录方法
The difference between hdmi2.1 and hdmi2.0 and the conversion of PD signals.
[step on the pit series] MySQL failed to modify the root password
基于RNA的新型癌症疗法介绍









