当前位置:网站首页>Docker install MySQL 8.0.28
Docker install MySQL 8.0.28
2022-07-27 07:37:00 【good_ 1uck】
Recorded on Tencent cloud server docker install MySQL
This installation refers to another blogger , Links are as follows
Docker install Mysql 8.0_Cherry_King The blog of -CSDN Blog _docker install mysql8.0
install docker
See my other article for specific installation steps
docker Installation and setup _good_1uck The blog of -CSDN Blog
install MySQL Of docker Mirror image
docker Official website Yes mysql Mirror and remove the mirror code

Pull MySQL Mirror image
docker pull mysql:8.0.28
Start the mirror
docker run -itd --name mysql-8 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql:8.0.28
Parameter description :
–name mysql-8: Name of the created container
-p 3306:3306 : Mapping container service's 3306 Port to host 3306 port , The external host can directly pass through the host ip:3306
Access to the MySQL Service for .
MYSQL_ROOT_PASSWORD=123456: Set up MySQL service root User's password
mysql:8.0: The image used , Image name :tagInto the mirror
# see docker process
docker ps
# Get into docker
docker exec -it mysql-8 /bin/bashTo configure MySQL Remote connection
1、 Sign in MySQL
mysql -uroot -p 1234562、 Switch databases and set up remote access
because mysql8 Different coding methods , So you also need to change the encoding method of the password , Otherwise, the remote cannot connect
use mysql
# Check the user and visit, and you will find two root
select host,user,plugin from user;
# First delete the redundant root
delete from user where user ='root' and host='%';
# Change the original root
update user set host='%' where user ='root';
# Change the encoding
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
# Refresh effective
FLUSH PRIVILEGES;After setting, you can connect .
边栏推荐
- Okaleido ecological core equity Oka, all in fusion mining mode
- Gossip: talk with your daughter about why you should learn culture lessons well
- js中的数组方法与循环
- IDEA中文乱码怎么办
- C程序代码的内存结构分析
- Bash: create a function that returns a Boolean value
- flink去重(一)flink、flink-sql中常见的去重方案总结
- Prior Attention Enhanced Convolutional Neural Network Based Automatic Segmentation of Organs at Risk
- Want to sink into redis hash and write in the attributes and values of the object. Do the bosses have a demo?
- Using soci to connect Oracle with PostgreSQL and SQLite on rhel8
猜你喜欢

IO中节点流和处理流的理解学习

Federal Reserve SR 11-7: Guidance on model risk management - Wanzi collection

(2022牛客多校三)J-Journey(dijkstra)

(2022 Niuke multi school III) j-journey (Dijkstra)

js做一个红绿灯

Chapter 6 Shell Logic and Arithmetic

Okaleido ecological core equity Oka, all in fusion mining mode

Cadence(十一)丝印调整和后续事项

【WSL2】配置连接 USB 设备并使用主机的 USB 摄像头

JS regular expression implementation adds a comma to every three digits
随机推荐
Examples of Oracle triggers
Gossip: Recently, many friends talk about going abroad
Drconv pytorch is changed to the same size of output and input
js做一个红绿灯
drawImage方法第一次调用不显示图片的解决方式
VLAN trunk experiment
连接MySQL时报错:Public Key Retrieval is not allowed 【解决方法】
ARP广播实践案例
IDEA中文乱码怎么办
Okaleido tiger is about to log in to binance NFT in the second round, which has aroused heated discussion in the community
我是不是被代码给耽误了……不幸沦为一名程序员……
Okaleido生态核心权益OKA,尽在聚变Mining模式
次轮Okaleido Tiger即将登录Binance NFT,引发社区热议
单片机多级菜单
C common function integration-3
安装tensorflow
海康h9摄像头用xshell无法连接(没有启用ssh)
C common function integration-2
User unlock sm04 sm12
RPC 远程过程调用