(Abolish all installations of win, linux, now just need to start docker) docker linux mysql installation

 

docker linux mysql installation

 

Since there are ready-made ones everywhere, let's use them. If you don't install them manually, it is very troublesome to decompress and install.

 

This example can be analogized, no need to install the linux version, or the windows version of mysql, just start the docker version. . . .

 

1. Download mysql at hub.docker.com

docker pull mysql

 

2. Start

docker run --name first-mysql -p 3306:3306 -e MYSQL\_ROOT\_PASSWORD=root -d mysql

docker run --name second-mysql -p 3307:3306 -e MYSQL\_ROOT\_PASSWORD=root -d mysql

docker run --name third-mysql -p 3308:3306 -e MYSQL\_ROOT\_PASSWORD=root -d mysql

 

3. View the results

b0fe040212d9        mysql               "docker-entrypoint..."   4 seconds ago       Up 2 seconds        0.0.0.0:3308->3306/tcp   third-mysql
ef089d978127        mysql               "docker-entrypoint..."   15 seconds ago      Up 14 seconds       0.0.0.0:3307->3306/tcp   second-mysql
ac52db9c6308        mysql               "docker-entrypoint..."   6 minutes ago       Up 6 minutes        0.0.0.0:3306->3306/tcp   first-mysql

 



 

4. Test navicat



 

 

 

 

 

 

 

 

 

 

 

 

 

 

Donate to developers 

Driven by interest, I write 免费something with joy and sweat. I hope you like my work and can support it at the same time. Of course, if you have money to support a money field (support Alipay, WeChat, and the buckle group), if you have no money to support a personal field, thank you.

 

Personal homepage : http://knight-black-bob.iteye.com/



 
 
 Thank you for your sponsorship, I will do better!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326225088&siteId=291194637