问题描述:
java.sql.SQLException: null, message from server: "Host 'DESKTOP-107D65V' is not allowed to connect to this MySQL server"
问题分析:
1、root用户只能使用localhost连接,不能使用局域网或外网IP连接。
解决办法:
第一步,进入sql。
第二步,输入use mysql;,选择数据库。
第三步,输入 update user set host='%' where user='root';,修改root用户的权限范围。
第四步,输入flush privileges;,将权限更新操作刷新到内存中。