Docker learning notes part one: install MySQL and use Navicat connection test (environment: centos7)


Install MySQL 8.0 in docker. Refer to the following documents:

docker pull mysql:8.0

Create the container and link to the bridge test_ Network, how to create a network bridge, refer to:Docker learning notes — net core project container connecting to MSSQL container (environment: centos7)

docker run -d --name=mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=Aa123456 --network=test_network mysql:8.0


MYSQL_ ROOT_ Password = aa123456 means to set the password of the login account root to aa123456

3306: 3306 indicates external link port

Enter the container and verify that the installation is successful

docker exec -it mysql bash


Execute the following command to view the installation information, and execute the command exit to exit the container!

mysql -u root -p

Using Navicat to link MySQL

Recommended Today

Interpretation of laravel kernel — HTTP kernel

Http Kernel HTTP kernel is used in laravel to concatenate the core components of the framework for network request, simply speaking, as long as it is through thepublic/index.phpTo start the framework, you will use HTTP kernel, while others will use HTTP kernelartisanThe console kernel is used for processing commands, scheduled tasks, and queue start frameworks. […]