当前位置:网站首页>Who has docker to install MySQL locally?
Who has docker to install MySQL locally?
2022-07-07 07:58:00 【Wu_ Candy】
introduction
When developing projects or scripts on personal computers , We often encounter the problem of data storage , In our work project Mysql It is a common business database , If you want to store data , Except for installing on our personal computers Mysql Is there no other choice for service ?
No,No, You can also choose not to install on your own computer Mysql Services can also solve data storage problems .
That is to use Docker Start a Mysql service , The development program can pass Host, Port Direct connection , Then start to increase at will , Delete , Change , Check the business data you created !
Today's share :
No local installation required Mysql service , Use Docker Super fast start Mysql Services realize data storage !
Operation steps
1. install Docker
Enter official website (https://www.docker.com/) Download the appropriate according to the operating system Docker edition , After downloading and installing successfully , The following whale icon will appear on the desktop .
2. start-up Docker
Double click the whale icon , After startup Docker The interface is as follows :
The two menus on the left are :
Containers/Apps
Images
Containers/Apps: Indicates that the container service has been started
Images: Indicates an existing local image , The list shown in the following figure shows the images I have pulled locally
3.Docker Pull Mysql Mirror image
Pull Mysql The latest version of the mirroring command :
docker pull mysql # No addition :latest By default, the latest version of the image is pulled
docker pull mysql:latest
Pull Mysql Specify the version mirroring command :
docker pull mysql:8.0.18
Search for Mysql Available version mirroring commands :
docker search mysql
4. View local image
docker images
You can see from the picture that you just pulled Mysql The image has been transferred to the local image list
5. Start the container
docker run -itd --name mysql-test -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql
Parameter description :
-p 3306:3306 : Mapping container service's 3306 Port to host 3306 port , External hosts can go directly through The host machine ip:3306 Access to the MySQL Service for .
MYSQL_ROOT_PASSWORD=123456: Set up MySQL service root User's password .
mysql-test: Indicates the name of the container started , This name can be customized
A long string container will be returned if the normal container is successfully started id, As shown in the figure above .
6. Check the container process started
docker ps
In addition to the command line window, you can view , You can also use the launched desktop version Docker To view the , As shown in the figure below
7.Navicat Tool connection Mysql service
(1). Use Navicat Tool connection just used Docker Container enabled Mysql service
According to the parameters set by the startup container , stay Navicat New China Mysql Connect
(2). see Mysql Database under
Summary
1. The program code can easily connect this Mysql service Increase data , Delete , Change , check .
2. Use Docker To start up Mysql The service saves local installation Mysql Steps for , relatively speaking Relatively light and fast .
Welcome to your attention 【 The way of immeasurable testing 】 official account , reply 【 Claim resources 】
Python+Unittest frame API automation 、
Python+Unittest frame API automation 、
Python+Pytest frame API automation 、
Python+Pandas+Pyecharts Big data analysis 、
Python+Selenium frame Web Of UI automation 、
Python+Appium frame APP Of UI automation 、
Python Programming learning resources dry goods 、
Vue Front end component framework development 、
Resources and code Free ~
Below the official account is two-dimensional code. , You can directly scan wechat and pay attention .
remarks : My official account has been officially opened. , betake IT Sharing of Internet technology .
contain : Data analysis 、 big data 、 machine learning 、 Test Development 、API Interface automation 、 Test operation and maintenance 、UI automation 、 Performance testing 、 code detection 、 Programming technology, etc .
WeChat search official account :“ The way of immeasurable testing ”, Or scan the qr code below :
Add the attention , Let's grow together !
边栏推荐
- [Stanford Jiwang cs144 project] lab3: tcpsender
- 【VHDL 并行语句执行】
- A bit of knowledge - about Apple Certified MFI
- Common method signatures and meanings of Iterable, collection and list
- Custom class loader loads network class
- 2022-07-06: will the following go language codes be panic? A: Meeting; B: No. package main import “C“ func main() { var ch chan struct
- C语言航班订票系统
- 【p2p】本地抓包
- php导出百万数据
- 2022茶艺师(初级)考试题模拟考试题库及在线模拟考试
猜你喜欢
buuctf misc USB
Force buckle 145 Binary Tree Postorder Traversal
2022 welder (elementary) judgment questions and online simulation examination
[UTCTF2020]file header
Operation suggestions for today's spot Silver
Sign up now | oar hacker marathon phase III, waiting for your challenge
php导出百万数据
You Li takes you to talk about C language 6 (common keywords)
【经验分享】如何为visio扩展云服务图标
nacos
随机推荐
C语言二叉树与建堆
Cnopendata American Golden Globe Award winning data
Is the test cycle compressed? Teach you 9 ways to deal with it
leetcode:105. Constructing binary trees from preorder and inorder traversal sequences
IO stream file
Cnopendata list data of Chinese colleges and Universities
[Stanford Jiwang cs144 project] lab4: tcpconnection
探索Cassandra的去中心化分布式架构
Rust Versus Go(哪种是我的首选语言?)
Info | webrtc M97 update
[UVM foundation] what is transaction
【obs】win-capture需要winrt
Pytest + allure + Jenkins Environment - - achèvement du remplissage de la fosse
快速使用 Jacoco 代码覆盖率统计
Regular e-commerce problems part1
【斯坦福计网CS144项目】Lab4: TCPConnection
Most elements
[2022 actf] Web Topic recurrence
Jenkins remote build project timeout problem
智联+影音,AITO问界M7想干翻的不止理想One