1.docker search mysql 2. docker pull mysql 3. docker images 4. Start the MySQL instance docker run --name dockermysql -p 3307:3306 -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql
5. docker ps -a 6. docker exec -it dockermysql bash 7.docker mysql -u root -p use mysql 8. grant all GRANT ALL PRIVILEGES ON *.* 'root'@'%' identified by '123123' WITH GRANT OPTION; This is a more common way of writing on the Internet. In fact, it will report an error. 9.flush privileges; refresh privileges 10. Login 11.Mysql remote connection error: MySQL 8.0 uses the caching_sha2_password authentication mechanism by default - changing from mysql_native_password to caching_sha2_password. Upgrading from 5.7 to 8.0 will not change the authentication method for existing users, but new users will use the new caching_sha2_password by default. The client does not support the new encryption method. Method 1: Change the user's password and encryption method ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; It should be the same as when granting user permissions. If it is localhost, do the same as above. The same is true for % New feature of mysql8.*: caching_sha2_password password encryption method Previous versions of MySQL used The default If you upgrade based on the previous MySQL, the password encryption used by the user must be mysql_native_password If you use the previous password encryption method, modify the file /etc/my.cnf Database time zone problem: Problem with the parameter serverTimezone=UTC when connecting to the database Just change it to serverTimezone=Asia/Shanghai and you’ll be fine! The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: MAC+PyCharm+Flask+Vue.js build system
>>: MySQL server 5.7.20 installation and configuration method graphic tutorial
CocosCreator version: 2.4.2 Practical project app...
Solution to the problem that there is no unzip co...
In the process of learning CSS3, I found that man...
How to solve the Mysql transaction operation fail...
1. First, generate the public key and private key...
1.0 Redis persistence Redis is an in-memory datab...
The previous articles introduced the replacement ...
MySQL deduplication methods 【Beginner】There are v...
Using depends_on to sort containers does not perf...
This article shares the specific code for JavaScr...
Use js to control the light switch for your refer...
Table of contents Preface 1. How to write functio...
1. What are the templates for ASP.NET Web applicat...
For record, it may be used in the future, and fri...
The specific method is as follows: CSS Code Copy ...