As a tester, you may often need to install some software under Linux during the learning process. If you install some software by searching other people's blog tutorials, with the upgrade of some software and external factors such as inconsistent virtual machine/server image versions, various unpredictable problems may occur in the installation of the software. At that time, you have to search for information to solve the problems one by one, which is very time-consuming. Moreover, the installation of these software under Linux is generally an operation and maintenance matter. If the test is used for learning, it is enough to install a MySQL database for learning. It is not recommended for novices to download source code to install software under Linux, as it is easy to cause problems. Next, I will show you how to quickly install a MySQL instance through Docker for learning: 1. First, build the docker environment 2. Download the MySQL image and start it (version 5.7 is slightly more stable. Different versions may have different default configurations for some systems, so please pay attention) Install MySQL via Docker: docker pull mysql:5.7 Start mysql: docker run -itd --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql:5.7 #Enter the container docker exec -it mysql bash Parameter Description:
Connect to mysql: # Enter interactive mode, and then connect using the command, or connect through navicat docker exec -it [container id] bash mysql -uroot -h127.0.0.1 -P3306 -p123456 For personal learning and installation of MySQL, it is ok to use the simple parameters above. If you want to consider future upgrades and backups, you need to add other parameters, such as mapping the data to a local directory. After the container is deleted and rebuilt, the data will not be lost. For specific operation methods, you can check the relevant tutorials on the novice tutorial for extended learning. This is the end of this article about installing MySQL using Docker in Linux. For more information about installing MySQL using Docker in Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Solution to HTML2 canvas SVG not being recognized
>>: Using docker command does not require sudo
The following information is compiled from the Int...
1. Install openssh-server yum install -y openssl ...
<br />Most of the time when we talk about na...
This article example shares the specific implemen...
Preface It is said that if the people doing opera...
<br />Every family has its own problems, and...
The link-in style is to put all the styles in one...
Table of contents Preface How to use Summarize Pr...
Preface This article mainly introduces the method...
This article uses examples to illustrate the prin...
When installing packages on an Ubuntu server, you...
Seeing the recent popular WeChat tap function, I ...
This article shares the specific code for the WeC...
To deploy war with Docker, you must use a contain...
1. Download https://dev.mysql.com/downloads/mysql...