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
Table of contents 1. Overview 2. Parameters for c...
Execute the command to install the plugin postcss...
1. Use css sprites. The advantage is that the smal...
Zabbix automatically discovers rules to monitor s...
Many people have read this book: "Grow as a ...
Table of contents Overview Code Implementation Su...
Zabbix deployment documentation After zabbix is ...
CentOS6.9+Mysql5.7.18 source code installation, t...
1. Leading fuzzy query cannot use index (like ...
<br />Previous article: Web Design Tutorial ...
This article introduces how to install the system...
Table of contents 1. Configure Linux hostname Con...
Recently, the project switched the environment an...
On a Windows server, if you want to back up datab...
Overview What is harbor? The English word means: ...