Pull the image docker pull mysql View the completed image docker images Create and start a MySQL container through the image docker run --name mysql_dev -e MYSQL_ROOT_PASSWORD=123456 -p 3333:3306 -d mysql
View all installed containers docker ps -a View the started container docker ps Stop/start services in the container docker stop mysql_dev docker start mysql_dev Entering the container docker exec -it mysql_dev bash View the IP address of the service in the container docker exec -it mysql_dev cat /etc/hosts The new version of MySQL reports an error when authorizing a user: near 'IDENTIFIED BY 'password' with grant option' at line 1 1 Question: When using the grant permission list on the database to 'user name'@' access host' identified by 'password'; the error "......near 'identified by 'password'' at line 1" will appear 2 reasons: Because the new version of MySQL has separated the way to create accounts and grant permissions 3 Solutions: Create an account: create user 'user name'@'access host' identified by 'password'; 4 Specific operations: # Add user CREATE USER 'mysql_dev' IDENTIFIED BY '123456'; # Grant permissions GRANT ALL PRIVILEGES ON *.* TO 'mysql_dev'@'%'; # Modify encryption rules ALTER USER 'mysql_dev'@'%' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER; # Update the user's password ALTER USER 'mysql_dev'@'%' IDENTIFIED WITH mysql_native_password BY '123456'; # Update configuration information FLUSH PRIVILEGES; The above is the details of the tutorial on how to install MySQL with Docker and realize remote connection. For more information about installing MySQL with Docker and realizing remote connection, please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: Causes and solutions for MySQL deadlock
>>: JavaScript to achieve text expansion and collapse effect
The default storage directory of mysql is /var/li...
<br />In the page, typesetting is achieved b...
load Request Success Request failed Click cmd and...
This article example shares the specific code of ...
Let's take a look at the situation where Secu...
As the company's influence grows and its prod...
View the IP address of the Container docker inspe...
1. Install ffmpeg under centos linux 1. Download ...
Table of contents Nginx load balancing configurat...
Table of contents Overview Hash Properties Host p...
#docker search #docker pull portainer 1. Download...
Table of contents 1. filter() 2. forEach() 3. som...
The correspondence between tensorflow version and...
1. Introduction MySQL comes with a replication so...
Table of contents MySQL's current_timestamp p...