当前位置:网站首页>Docker installing MySQL
Docker installing MySQL
2022-06-24 19:33:00 【God__ is__ a__ girl】
docker install mysql
- Inquire about mysql edition
docker search mysql
- Download the version you need
docker pull mysql
- Create a mirror instance
docker run --name mysql01 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql
- Get into mysql example
docker exec -it mysql01 bash
- land mysql
mysql -uroot -p
- Use to grant permissions
grant all privileges on *.* to `root`@`%`;
This kind of writing is popular on the Internet , In fact, an error will be reported
GRANT ALL PRIVILEGES ON *.* ‘root’@’%’ identified by ‘root’ WITH GRANT OPTION;
- Refresh the permissions
flush privileges;
- Now you can connect remotely with other connection tools
The overview
[[email protected] docker]# docker pull mysql
......
[[email protected] docker]# docker run --name mysql01 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql
1eab0aa45b90b793914265ea0012035d6a6d592f5b9484663d37929353b438f2
[[email protected] docker]# docker exec -it mysql01 bash
[email protected]:/# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.19 MySQL Community Server - GPL
Copyright (c) 2000, 2020, 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> grant all privileges on *.* to `root`@`%`;
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
边栏推荐
- Steering gear control (stm32f103c8t6)
- Does finkcdc support sqlserver2008?
- How to protect biological privacy in the AI era? Overview of the latest "privacy enhancement technology in biometrics" of the Autonomous University of Madrid, comprehensively detailing the biometric p
- Mq-2 smoke concentration sensor (STM32F103)
- Volcano becomes spark default batch scheduler
- 优维低代码:构件渲染子构件
- How to select the ECS type and what to consider?
- Power efficiency test
- Experience of MDM master data project implementation for manufacturing projects
- Huawei machine learning service speech recognition function enables applications to paint "sound" and color
猜你喜欢

Php OSS file read and write file, workerman Generate Temporary file and Output Browser Download

Apifox与其他接口开发工具的博弈

php OSS文件读取和写入文件,workerman生成临时文件并输出浏览器下载

网络安全审查办公室对知网启动网络安全审查

Northwestern Polytechnic University attacked by hackers? Two factor authentication changes the situation!

Understanding openstack network

企业网络管理员必备的故障处理系统

Kubernetes集群部署

全链路业务追踪落地实践方案

Digital twin industry case: Digital Smart port
随机推荐
西北工业大学遭黑客攻击?双因素认证改变局面!
Application scenarios of channel of go question bank · 11
Power efficiency test
《Go题库·11》channel的应用场景
多云模式并非“万能钥匙”
怎么使用R包ggtreeExtra绘制进化树
BSS应用程序云原生部署的8大挑战
How to select the ECS type and what to consider?
starring V6平台开发接出点流程
Kubernetes cluster deployment
Volcano成Spark默认batch调度器
Would you like to ask whether the same multiple tasks of the PgSQL CDC account will have an impact? I now have only one of the three tasks
R language 4.1.0 software installation package and installation tutorial
Programmers spend most of their time not writing code, but...
Generate the last login user account report of the computer through SCCM SQL
The agile way? Is agile development really out of date?
目前是不是只cdc 监控mysql 可以拿到新增列的数据 sqlserver不行是吧
starring开发HttpJson接入点+数据库
Module V
Source code analysis of ArrayList