当前位置:网站首页>Docker install mysql, hello world
Docker install mysql, hello world
2022-06-22 07:47:00 【Huangbao ~】
1. Create folder
mkdir /opt/mysql_docker
2. Download mirroring
docker pull mysql
3. Run container
docker run -d --name mysqlserver -p 3306:3306 -v /opt/mysql_docker/conf:/etc/mysql/conf.d -v /opt/mysql_docker/logs:/logs -v /opt/mysql_docker/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 mysql
-d Background operation
--name Set the alias to mysqlserver
-p Port mapping
-v Folder mapping , /var/lib/mysql by mysql Data directory
-e Set up mysql The login password
4. Into the container
docker exec -it mysqlserver bash
5. Sign in mysql
mysql -uroot -p123456
6. Turn on Remote Access
use mysql;
select host,user from user;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
flush privileges; Refresh the permissions
7. test
边栏推荐
- Open version - user level
- 【宋红康 MySQL数据库 】【高级篇】【07】MySQL的存储引擎
- Download addresses of Xcode versions
- Fmdb usage details mark
- Some problems caused by null data in MySQL
- 对于mysql中数据为NULL引发的一些问题和思考
- [standard version 4.3] marketing activities (group bargaining second kill) error reporting under orders
- The ranking of websites is very important for websites
- UI draw line
- 基于消息传递的并发编程(MPI)之异步收发
猜你喜欢

Usage and understanding of async/await in JS

微信小游戏(四)

Use js to download the current image

Qualcomm platform msm8953 display subsystem learning

How to upload Taobao tmall products with one click

模电实验——实验二 JFET共源极放大电路

充电宝的玄机

JS native implementation for loop rendering array

对于mysql中数据为NULL引发的一些问题和思考

Crmeb open version 4.3
随机推荐
Impact of dead chain on websites
ExcelToJson
7、 Picker component
5、 Image component
ConfigManager JsonToObject
Open source open source version - release products
Xlua environment configuration
How to improve Baidu's weight
Crmeb open version 4.3
对于mysql中数据为NULL引发的一些问题和思考
简单是最好的网络推广的方法
网站的日常维护
Reasons and solutions for Taobao's baby's prompt "sales attribute is required and parameter format is wrong"
Qualcomm platform msm8953 display subsystem learning
How to batch copy babies by sales volume in Taoying
Open source open source version - pintuan
Semaphore
MTK platform execution disable_ Interrupt signals masked during IRQ will be enabled when I execute enable_ Continue triggering after IRQ
微信小游戏(二)
phpcms手机门户网站配置