美文网首页Bug记录SQL
Host is not allowed to connect t

Host is not allowed to connect t

作者: 花伤情犹在 | 来源:发表于2022-03-27 08:24 被阅读0次

    方法1:

    mysql>use mysql;
    
    mysql>update user set host = '%' where user = 'root';
    
    mysql>select host, user from user;
    

    方法2:

    mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
    
    mysql>flush privileges;
    

    说明:%是哪个IP地址可以访问这个MYsql服务,可以换成你想要的IP地址!

    相关文章

      网友评论

        本文标题:Host is not allowed to connect t

        本文链接:https://www.haomeiwen.com/subject/uibejrtx.html