JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

java.sql.SQLException: null, message from server: “Host ‘***.***.**.**‘ is not allowed to connect to(连不到同一局域网下其他的电脑上的mysql)

发布时间 2023-07-31 14:46:06作者: AIHHUAO

1 use mysql; --在mysql数据库中

 

1 CREATE USER 用户名 IDENTIFIED BY '用户名密码'; --创建一个用户
2 
3 GRANT ALL ON 数据库名称.* TO 用户名; --给该用户授权想要连接的数据库
4 
5 FLUSH PRIVILEGES; //刷新
6 
7 SELECT * FROM USER; 

 

    本栏目推荐文章
  • A connection was successfully established with the server but then an error
  • vscode错误:Unable to connect to VS Code server: Error in request.
  • mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; ERROR 1410 (42000): You are not allowed to create a user with GRANT
  • scp 出现 subsystem request failed on channel 0 scp: Connection closed 的解决方法
  • windows查看局域网中的所有IP
  • Windows11局域网无法发现其他电脑的解决方法2024年1月11日解决
  • 解决前后端的跨域问题:Access to XMLHttpRequest at '**' from origin '**' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  • EAS_WEB更新解决方案后,无法登录web页面,显示connect.refused
  • No 'Access-Control-Allow-Origin' header is present on the requested resource', 跨域访问的解决方法
  • 连接MySQL时报错:Public Key Retrieval is not allowed的解决方法
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们