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
<br />Related article: Analysis of Facebook&...
Table of contents Initially using the callback fu...
Table of contents Preface Two-dimensional array, ...
Preface Tip: Here you can add the approximate con...
The difference between replace into and insert in...
Table of contents 1. Implementation process 2. Di...
Most of the time, plug-ins are used to upload fil...
MySQL error: Parameter index out of range (1 >...
I believe everyone has had this feeling: watching ...
Utilize the browser's non- overflow:auto elem...
Today, the company's springboot project is re...
1. Principle of Hotlinking 1.1 Web page preparati...
Method 1: Use Google advanced search, for example...
0 Differences between icons and images Icons are ...
MySQL8.0.22 installation and configuration (super...