zoukankan      html  css  js  c++  java
  • MySQL报错"Host ' is not allowed to connect to this MySQL server"

    Android连接数据库,MySQL报错:W/System.err: java.sql.SQLException: null,  message from server: "Host 'WIN-BFHI27MPO93' is not allowed to connect to this MySQL server"

    原因是:远程服务器不允许你的java程序访问它的数据库。

    解决步骤:

    1、打开mysql控制台,输入:use mysql;

    2、输入:show tables;

    3、输入:select host from user;

        user为root,host为localhost的话,说明mysql只允许本机连接

    4、输入:update user set host ='%' where user ='root';

    5、执行刷新权限,输入:flush privileges;

  • 相关阅读:
    查看tls指纹
    并行流
    方法引入2
    方法引入
    Optional.ofNullable
    stream.filter
    stream.skip limit
    反射
    Optional orElseGet
    nginx 预压缩(gzip)
  • 原文地址:https://www.cnblogs.com/xjmm/p/12518798.html
Copyright © 2011-2022 走看看