The password you set after creating the MySQL container inside Docker has an error when connecting to the remote host:
First, if the MySQL image installed in the Docker will need to enter the MySQL inside: Refer to previous article: https://www.cnblogs.com/ya-qiang/p/9093558.html
Second, MySQL configuration
1. Use the root user to connect to the remote host MySQL
Mysql-u root-p
Note: mysql-u maximum rights user name----Re-enter password enter
2. Set User Configuration Items
(1) Viewing user information
Select host,user,plugin,authentication_string from Mysql.user;
Note: Host% indicates that IP localhost is not restricted to use plugin non-mysql_native_password to change the password
(2) Modify user password
1. If you want to set remote this setting: ALTER USER ' root ' @ '% ' identified with Mysql_native_password by ' newpassword '; #更新一下用户的密码 root user password is NewPassword
2. If you want to set the local plugin to mysql_native_password this setting:
ALTER USER ' root ' @ ' localhost ' identified with Mysql_native_password by ' newpassword '; #更新一下用户的密码 root user password is NewPassword
Flush privileges;
The MySQL service sets the remote connection to resolve 1251 client does not support: Problem