描述:MySQL安装在VMware上面的CentOS,在Windows访问,连不上,一是linux的防火墙没有开放端口,二是MySQL默认不支持外部链接,报错大概如下,或者是其他错误
java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.
或者
null, message from server: "Host '192.168.197.1' is not allowed to connect
- 如果是写Java访问的,因为使用的是MySQL 8.0 ,所以则要注意将版本进行修改
<dependency>
<groupId>mysql