In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you how to install mysql database in docker, the content is very detailed, interested friends can refer to, hope to be helpful to you.
Docker installation database
Note that the DEMO example in this article is only applicable to the native development environment, not the online production environment.
Use the command docker ps if you have the following output, docker is installed
If there is no installation, please refer to the official website of docker. Windows/mac can download and install the installation package directly.
Download address: https://www.docker.com/products/docker-desktop
Commands to install Mysql
Docker run-p 33306 MYSQL_ROOT_PASSWORD=javastudy 3306-- name mysql-docker-e MYSQL_ROOT_PASSWORD=javastudy-d mysql
The command parameters explain:
-p port binding, binding the host's port 33306 and docker container's port 3306
-- name gives the running container a name. The name cannot be repeated.
-e set the environment variable to the container, and set the root password to mysql through the environment variable
-d the container will run in the background after it is started
Which image is used by mysql
Use tools to connect to mysql
Here the blogger uses the database connection tool that comes with idea. After the connection is successful, you can see that the database version number is 8.0.18.
On how to install the mysql database in docker to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.