Host 'xxx' is not allowed to connect to this MySQL server

root使用mypassword从任何主机连接到mysql服务器的话。
GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;
允许用户myuser从ip为192.168.1.3的主机连接到mysql服务器,并使用mypassword作为密码
GRANT ALL PRIVILEGES ON . TO ‘root’@‘192.168.1.3’ IDENTIFIED BY
‘mypassword’ WITH GRANT OPTION;
输入命令mysql> FLUSH PRIVILEGES; 回车使刚才的修改生效,再次远程连接数据库成功

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用和提到了一个关于MySQL服务器的错误提示信息:“Host is not allowed to connect to this MySQL server”。这个错误提示意味着指定的主机或IP地址被禁止连接到MySQL服务器。引用中对这个错误进行了翻译,即“不允许主机 123.120.193.96 连接到此 MySQL 服务器”。所以,根据你的问题中的提示信息,“Host BaiuPC is not allowed to connect to this MySQL server”,可以理解为BaiuPC这个主机被禁止连接到MySQL服务器。 对于这个问题,有几个可能的原因。首先,检查一下MySQL服务器的配置,确保允许远程主机连接。其次,确认BaiuPC这个主机的IP地址是否在MySQL服务器的允许连接列表中。如果不在列表中,可以尝试将其添加到允许连接的列表中。 另外,还需要检查一下BaiuPC主机上使用的用户名和密码是否正确,以确保可以成功连接到MySQL服务器。如果用户名或密码错误,也可能导致无法连接到MySQL服务器。 最后,还需要确保BaiuPC主机和MySQL服务器之间的网络连接正常。检查防火墙设置和网络配置,确保没有阻止连接的问题。 综上所述,要解决“Host BaiuPC is not allowed to connect to this MySQL server”的问题,需要检查MySQL服务器的配置,确认BaiuPC主机的IP地址是否在允许连接列表中,确保用户名和密码正确,并检查网络连接是否正常。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [远程连接mysql报错:1130 - Host XXX is not allowed to connect to this MySQL server](https://blog.csdn.net/qq_43674360/article/details/123573136)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [Host is not allowed to connect to this MySQL server](https://blog.csdn.net/web_long/article/details/131601116)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值