Host lenovo-PC is not allowed to connect to this MySQL server
2018-03-05 19:08
218 查看
项目启动后控制台输出:
这是因为没有给本机电脑连接权限。
解决方法:
1.打开cmd,进入到MySQL安装的bin目录,连接MySQL。如何连接与安装MySQL请查看博主
另一篇博客http://blog.csdn.net/weixin_40671802/article/details/79273614点击打开链接。
2.接着输入use mysql-> select user,host from user; 可以查看到允许连接的没有本机IP,root用户只允许在127.0.0.1和localhost上进行连接,而不允许使用本机在局域网中的ip进行连接。。
3.输入:
4.最后一步刷新一下权限
这是因为没有给本机电脑连接权限。
解决方法:
1.打开cmd,进入到MySQL安装的bin目录,连接MySQL。如何连接与安装MySQL请查看博主
另一篇博客http://blog.csdn.net/weixin_40671802/article/details/79273614点击打开链接。
2.接着输入use mysql-> select user,host from user; 可以查看到允许连接的没有本机IP,root用户只允许在127.0.0.1和localhost上进行连接,而不允许使用本机在局域网中的ip进行连接。。
3.输入:
GRANT
ALL
PRIVILEGES
ON
*.*
TO
'root'
@
'10.100.110.167'
IDENTIFIED
BY
''
WITH
GRANT
OPTION
;允许地址10.100.110.167上用root用户,无密码来连接mysql的所有数据库,付给select,insert,update,delete权限。
4.最后一步刷新一下权限
flush
privileges
;
相关文章推荐
- java数据库连接(mysql)java.sql.SQLExcept "Host 'Lenovo-PC' is not allowed to connect to this MySQL server"
- Host 'admin-PC' is not allowed to connect to this MySQL server
- Host 'admin-PC' is not allowed to connect to this MySQL server
- Host 'admin-PC' is not allowed to connect to this MySQL server
- 大牛初步之kettle连接mysql的奇葩错误: message from server: "Host 'PCXX‘ is not allowed to connect to this MySQL s
- "Host 'admin-PC' is not allowed to connect to this MySQLserver"
- Host 'thinkive-PC' is not allowed to connect to this MySQL server错误解决办法
- Host 'admin-PC' is not allowed to connect to this MySQL server
- Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server
- Host '***' is not allowed to connect to this MySQL server"
- ERROR 1130: Host 'xxx' is not allowed to connect to this MySQL server
- "Host 'USER-XXXX' is not allowed to connect to this MySQL server"
- is not allowed to connect to this MySQL server解决办法
- message from server: "Host '192.168.1.10' is not allowed to connect to this MySQL server
- 报错:1130-host ... is not allowed to connect to this MySql server
- ERROR 1130 (HY000): Host 'xxx' is not allowed to connect to this MySQL server
- mysql: 1130 Host '192.168.1.3' is not allowed to connect to this MySQL server
- mysql远程连接 Host * is not allowed to connect to this MySQL server
- mysql不允许其他ip连接 MySql - SQL Error (1130): Host IP is not allowed to connect to this MySQL server
- Host 'XXX' is not allowed to connect to this MySQL server 解决方案/如何开启MySQL的远程帐号