Mysql报错java.sql.SQLException:null,message from server:"Host '27,45,38,132' is not allowed to connect
Mysql报错java.sql.SQLException:null,message from server:"Host '27,45,38,132' is not allowed to connect
远程连接mysql数据库,出现异常:
null,message from server:"Host '27,45,38,132' is not allowed to connect
解决方案:
原因是:远程服务器不允许你访问它的数据库。所以,我们要对远程服务器进行设置,使它允许你进行连接。
1,打开cmd命令窗口,进入MySQL安装目录的bin目录,然后登录MySQL
mysql -u root -p
2,输入:切入mysql数据库
use mysql;
3,输入:查看user表
select host,user from user;
4,输入:更改host字段值
update user set host ='%' where user ='root';
5,输入:即时生效
flush privileges;
6,如果还是没效果,再次输入:创建远程登陆用户并授权:
grant all PRIVILEGES on msyql.* to root@'192.168.1.101' identified by '';
grant all PRIVILEGES on sys.* to root@'192.168.1.101' identified by '';
或者
grant all PRIVILEGES on *.* to root@'192.168.1.101' identified by '';
上面的语句表示将 test_db 数据库的所有权限授权给 root 这个用户,允许 root 用户在 192.168.1.101 这个 IP 进行远程登陆,并设置 root 用户的密码为 123456 。
7,输入:即时生效
flush privileges;
Mysql报错java.sql.SQLException:null,message from server:"Host '27,45,38,132' is not allowed to connect的更多相关文章
- hive报错java.sql.SQLException: null, message from server: "Host '192.168.126.100' is not allowed to connect to this MySQL server"
- 远程连接Mysql报错 java.sql.SQLException:null,message from server ... is not allowed to connect
在MySQL命令行输入如下命令: use mysql; select host from user; update user set host ='%' where user ='root'; 然后重 ...
- java.sql.SQLException: null, message from server: "Host '192.168.xxx.xxx' is not allowed to connect to this MySQL server"
当你连接自己的电脑上的MySQL时,报这样的错,你可以把ip换成 127.0.0.1或者localhost ,当然前提是用户名和密码正确
- java.sql.SQLException: null, message from server: "Host '192.168.126.100' is not allowed to connect to this MySQL server"
- 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 ...
- java.sql.SQLException: null, message from server: “Host ‘xxx’ is not allowed to connect
java.sql.SQLException: null, message from server: “Host ‘xxx’ is not allowed to connect 2014年06月29日 ...
- Solr java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect to this MySQL server
在用solr从mysql导入数据的时候,因为linux和本机的数据库不在同一个ip段上, 又因为本地的mysql没有设置远程其它ip可以访问所以就报了如下错误 解决办法: 在mysql任意可以输入查询 ...
- (办公)mysql连接不上(java.sql.SQLException: null, message from server: "Host 'LAPTOP-O0GA2P8J' is not allowed to connect to this MySQL server")(转)
转载自csdn文章:https://blog.csdn.net/Tangerine_bisto/article/details/803461511.对所有主机进行访问授权 GRANT ALL PRIV ...
- Spring 连接MySQL报错java.sql.SQLException: Unknown system variable 'tx_isolation'
先是报错255,这个时候需要把 jdbc:mysql://localhost:3306/projUse 写成 jdbc:mysql://localhost:3306/projUse?useUnicod ...
随机推荐
- huawei
线程堆栈(Thread Stack)和托管堆(Managed Heap) 每个正在运行的程序都对应着一个进程 (process),在一个进程内部,可以有一个或多个线程(thread),每个线程都拥有一 ...
- keras 分类回归 损失函数与评价指标
1.目标函数 (1)mean_squared_error / mse 均方误差,常用的目标函数,公式为((y_pred-y_true)**2).mean()(2)mean_absolute_error ...
- mac系统搭建SVN版本控制
版权声明:本文为博主原创文章,未经博主允许不得转载. SmartSVN 8.6和Keygen for mac(完美破解)http://pan.baidu.com/s/1bnm72qz 一.里面包含Sm ...
- 定位amdu无法使用的根因并解决
环境: OEL 5.7 + Oracle 10g + amdu_X86-64 现象: 我的两套实验环境,一套单实例,一套RAC,操作系统都是OEL 5.7,数据库都是Oracle 10g,上传同样的a ...
- sift拟合详解
1999年由David Lowe首先发表于计算机视觉国际会议(International Conference on Computer Vision,ICCV),2004年再次经David Lowe整 ...
- MS16-032 漏洞复现
exploit-db的详情: https://www.exploit-db.com/exploits/39574/ Windows: Secondary Logon Standard Handles ...
- spark 关联source
IDEA就自动把jar包中的字节码反编译为Java源码,并且,我们可以直接下个断点调试程序,但是对于Scala,IDEA的反编译效果并不是很好,如下图所示: 2)提示“Source not found ...
- executing in nfs will not generate core dump file
最近遇到了一个奇怪的问题. linux系统的pc搭建nfs server,开发板作为nfs client,开发板中全程root权限操作,执行的程序放到 nfs server 中 exports 出的目 ...
- centos python2升级为python3 升级旧版本django
阿里云centos python3 及django的配置 安装python3后 pip 会把下载的包安入python2.7 下面解决该问题 python3.5安装1,安装依赖包#yum install ...
- 擠出機步進馬達的 Steps per Unit 該如何計算?
擠出機步進馬達的 Steps per Unit 該如何計算? 這邊 Steps per Unit 指的是塑料往前推進1mm,步進馬達須要走幾步.依此定義,可知計算方式可以用 步進馬達轉一圈需要的步 ...