SQLException:null, message from server: “Host ‘xx‘ is not allowed to connect to this MySQL server“
java.sql.SQLException: null, message from server: "Host 'PC-20220124VASY' is not allowed to connect to this MySQL server"
以上报错信息为,当前登录的mysql账号没有访问权。只能使用'localhost'或'127.0.0.1'访问,使用本地电脑的IP地址也是不可以访问的。
解决思路:
修改当前登录的mysql账号的访问权限
#登录mysql
mysql -u账号 -p密码
#登录成功之后进入mysql数据库
use mysql
#查询user表
select user,host from user;
#修改当前root账号的访问权限
update user set host='%' where user='root';
#刷新
flush privileges;
#再次查询
select user,host from user;
经过以上的操作,再次启动项目这个问题就解决了!
SQLException:null, message from server: “Host ‘xx‘ is not allowed to connect to this MySQL server“相关推荐
- 服务器连接mysql数据库,报错message from server: “Host xxx is not allowed to connect to this MySQL server“
操作系统 Windows 开发工具:IDEA 数据库:MySQL 使用MyBatis访问数据库的表提示错误信息: message from server: "Host xxx is not ...
- message from server: “Host ‘DESKTOP-FAJUM7V‘ is not allowed to connect to this MySQL server“
一.现象(非本地(localhost)无法登录数据库) 后台无法连接数据库,并提示如下错误 message from server: "Host 'DESKTOP-FAJUM7V' is n ...
- message from server: Host 'XXXX' is not allowed to connect to this MySQL server
环境:mysql5.7.11 + windows10 64位 问题现象:使用mysql远程登录命令mysql –uroot –h192.168.1.102 –p时,报错MySQL ERROR 1130 ...
- 连接失败!null, message from server: “Host ‘xxxx‘ is not allowed to connect to this MySQL server“
命令后登陆数据库 mysql -uroot -proot show databases: use mysql ; select user,host from user; # 可以看到user为root ...
- message from server: Host 'DESKTOP-QIR7OV5' is not allowed to connect to this MySQL server问题
情景:最近自己设计一些表,想利用自动生成工具来快速生成文件.由于数据库是本地的,生成工具的项目也是本地的,按照配置好数据源之后 启动项目,结果报错了,无法访问到数据库. 解决办法是: 我这里用的是Na ...
- host 'xx' is not allowed to connect to this MySql server
update mysql.user set host = '%' where user = 'root'; FLUSH PRIVILEGES; select * from mysql.user; 转载 ...
- message from server: “Host ‘dsy‘ is not allowed to connect to this MySQL server“
问题 输入hive命令报错,重启后也没有用,随后尝试连接mysql出现这个问题 尝试登陆mysql发现密码居然不能用了? 在/etc/my.cnf 的[mysqld]下加入skip-grant-tab ...
- mysql server 80_mysql Host 'microsof-80f25e' is not allowed to connect to this MySQL server
机器重新安装系统后,之前好好的项目运行项目报错:Host '主机名' is not allowed to connect to this MySQL server 控制台信息如下: [2013-08- ...
- mysql远程连接 host_MySQL远程连接:Host 'x' is not allowed to connect to this MySQL server
MySql数据库:Host 'localhost' is not allowed to connect to this MySQL server 修改mysql的roo ...
最新文章
- 水域大小 Java_水域大小
- 读《c#与算法--快速排序》随笔
- WIN2008 R2 Active Directory 之一 部署企业中第一台Windows Ser
- mysql 字符串中取整_MySQL取整
- .NET MVC 保存Session值,6位数验证码
- 机器学习之 sklearn.preprocessing 模块
- 云原生五大趋势预测,K8s安卓化位列其一
- More Effective C++ (限制类的对象数量)
- python max函数key_Python标准库:内置函数max(iterable, *[, key, default]) | 学步园
- numpy系列之拷贝和视图
- Iphone 5s 8.0.2越狱
- 同济线性代数教材(第五版)-第2章 矩阵及其运算
- learn git 廖雪峰GIT教材1 创建与合并分支
- 计算机专业考研可关注哪些公众号,考研应关注哪些公众号?
- excel函数去重_Excel去除重复值方法汇总
- GBase 8c开发接口
- 第 4-4 课:Spring Boot 中使⽤ Cache 缓存的使⽤
- 99、汽车库、修车库的安全疏散要求
- postfix中recipient/client/sender/helo四者的区别转载
- 语音差分编码(DPCM)的实现与改进——Python实现
热门文章
- 面向未来,我们来聊一聊什么是现代化数据架构
- Vue语法:类名和样式绑定
- linux运行python脚本_将Python脚本文件包装成可执行文件
- 非安装tomcat,服务安装_离水的鱼_新浪博客
- 如何构建智慧矿山管理平台?
- 轻触开关的全球与中国市场2022-2028年:技术、参与者、趋势、市场规模及占有率研究报告
- 一次jvm导致线上内存占用过高问题定位
- org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.Mav
- 成本(CPU Costing)的含义
- 淘宝获取商品历史价格信息 API 返回值说明