300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 解决 javasql.null message from server: “Host ‘‘ is not allowed to connect to this MySQL server“

解决 javasql.null message from server: “Host ‘‘ is not allowed to connect to this MySQL server“

时间:2018-06-17 07:55:24

相关推荐

解决 javasql.null  message from server: “Host ‘‘ is not allowed to connect to this MySQL server“

解决办法:

1.打开cmd,进入mysql

mysql -u root -p

2.查看root用户的信息

use mysql;

select user,host from user;

3.修改root用户的被限制的ip范围,改为不限制,及允许所有ip访问

update user set host='%' where user='root';

ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'不予理会

直接刷新就行:就可以连接数据库了

flush privileges;//刷新权限

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。