1、别人在用自己的tomcat访问我留的查询接口时,出现Cannot create PoolableConnectionFactory (null,  message from server: "Host 'admin-PC' is not allowed to connect to this MySQL server")这个问题

解决办法:

mysql -u root -p 

mysql>use mysql; 

mysql>select 'host' from user where user='root'; 

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

mysql>flush privileges; 

mysql>select 'host'   from user where user='root'; 

第一句是以权限用户root登录 

第二句:选择mysql库 

第三句:查看mysql库中的user表的host值(即可进行连接访问的主机/IP名称) 

第四句:修改host值(以通配符%的内容增加主机/IP地址),当然也可以直接增加IP地址 

第五句:刷新MySQL的系统权限相关表 

第六句:再重新查看user表时,有修改。。

重启重启mysql!!!!

启动服务命令 
net start mysql
关闭服务命令 
net stop mysql 

Cannot create PoolableConnectionFactory (null, message from server: "Host 'admin-PC' is not allowed to connect to this MySQL server")的更多相关文章

  1. MySQL远程(IP)连接报错:Host 'IP地址' is not allowed to connect to this MySQL server

    ERROR 1130: Host ’192.168.1.3′ is not allowed to connect to this MySQL server这是告诉你没有权限连接指定IP的主机,下面我们 ...

  2. MYSQL错误1130:ERROR 1130: Host 10.10.36.115 is not allowed to connect to this MySQL server

    解决远程连接mysql错误1130代码的方法  在用远程连接Mysql服务器的数据库,不管怎么弄都是连接不到,错误代码是1130,ERROR 1130: Host 10.10.36.115 is no ...

  3. HOSt ip is not allowed to connect to this MySql server, MYSQL添加远程用户或允许远程访问三种方法

    HOSt ip is not allowed to connect to this MySql server 报错:1130-host ... is not allowed to connect to ...

  4. java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect to this MySQL server"

    java.sql.SQLException: null,  message from server: "Host 'xxx' is not allowed to connect to thi ...

  5. 报错 "Host '192.168.209.1' is not allowed to connect to this MySQL server"

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/weixin_37632381/artic ...

  6. MySQL远程连接:Host 'x' is not allowed to connect to this MySQL server

    远程连接MySQL时发现如下错误: java.sql.SQLException: null, message from server: "Host '192.168.30.23' is no ...

  7. 解决服务器连接错误Host ‘XXX’ is not allowed to connect to this MySQL server

    这段时间在研究火车头的入库教程,在“配置登陆信息和数据库(mysql)”连接中,出现“服务器连接错误Host 'XXX' is not allowed to connect to this MySQL ...

  8. | unauthenticated user (1130, "Host '127.0.0.1' is not allowed to connect to this MySQL server")

    mysql> show processlist;+----+----------------------+-----------------+------+---------+------+-- ...

  9. 解决远程连接数据库:Host is not allowed to connect to this MySQL server

    远程连接数据时,报以下提示: Host 'web1' is not allowed to connect to this MySQL server 原因是数据库服务不允许远程登录,没有授权导致,解决方 ...

随机推荐

  1. CodeForces 29D Ant on the Tree

    洛谷题目页面传送门 & CodeForces题目页面传送门 题意见洛谷里的翻译. 这题有\(\bm3\)种解法,但只有一种是正解(这不是废话嘛). 方法\(\bm1\):最近公共祖先LCA(正 ...

  2. Spring 2017 Assignments2

    一.作业要求 原版:http://cs231n.github.io/assignments2017/assignment2/ 翻译:http://www.mooc.ai/course/268/lear ...

  3. if else 深度优化

    一. if else表达式过于复杂 if ((condition1 && condition2 ) || ((condition2 || condition3) && ...

  4. 网页如何设置favicon.ico

    1.首先制作ico图,并命名favicon.ico 2.将文件放在项目的根目录下

  5. mssql server master 数据库还原

    今天想试一下master数据库还原,在进入单用户模式的时候,在命令行输入sqlserver.exe -c -f -m结果显示 'sqlserver.exe' 不是内部或外部命令,也不是可运行的程序或批 ...

  6. Goland_IDE的护眼、主题、字体等设置

    Goland_IDE的护眼.主题.字体等设置 1.代码格式化 File->Settings->Tools->File Watchers->+->go fmt->将N ...

  7. error LNK2001: unresolved external symbol "__declspec(dllimport)

    作为C++的小白,出现这个错误,是最头痛的.针对这种问题,我搜了网上的相关答案,很多都是在教Project ---> Settings中改动相关设置.我改了之后,问题依旧没有解决.后面查了这种问 ...

  8. c++的构造和析构

    //文件名ss.h 1 #pragma once class ss { private: char*p;//利用指针来为p申请对内存 float height; ; char sex; public: ...

  9. Leetcode solution 124: Binary Tree Maximum Path Sum

    Problem Statement Given a non-empty binary tree, find the maximum path sum. For this problem, a path ...

  10. 关于selenium自动化对窗口句柄的处理

    首先什么是句柄?句柄就是你点击一个页面,跳转了一个新的窗口.你要操作的元素可能在原窗口上,也有可能在新窗口上. 看下图句柄1 句柄2 由这2张图可知,url不一样,证明他们是处于不同的界面,我要操作的 ...