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
Preface: This article only introduces the steps t...
Select and change: click to display the current v...
0. Overview Zabbix is an extremely powerful ope...
Table of contents background Understanding compos...
This article example shares the specific code of ...
1. HTML Overview htyper text markup language Hype...
In web front-end development, it is inevitable to ...
A while ago, I wrote a blog post titled "Can...
Preface In fact, the humble "!" has man...
1. Introduction By enabling the slow query log, M...
Recently, I have a project that requires using ifr...
Preface I believe everyone knows that indexes are...
Mysql is a mainstream open source relational data...
Table of contents 1. What is the life cycle 2. Lo...
Preface MySQL database lock is an important means...