1、本机搭建mysql,使用mybatis连接提示如下错误信息:
message from server: "Host 'xxx' is not allowed to connect to this MySQL server
造成上述的错误的原因:
数据库连接的账户不允许从远程登陆,只允许使用localhost连接。
2.解决办法
修改mysql数据库中的 "user" 表里的 "host" 字段,从"localhost"改称"%"
use mysql;
update user set host = '%' where user = 'root';
flush privileges;
- server MySQL MyBatis3 MyBatis messageserver mysql mybatis3 mybatis mybatis3 springboot2 springboot mybatis3 mybatis server message allowed connect server xx message allowed 方面message server block message服务器server block mysql_native_password password message method message mysql table proto windows server mysql 2022