• MySQL 1130错误,无法远程连接


    错误:ERROR 1130: Host '192.168.1.3' is not allowed to connect to thisMySQL serve

    错误1130:主机192.168.1.3”不允许连接到thismysql服务

    原因:被连接的数据不允许使用 192.168.1.3访问,只允许是用 localhost;

    解决办法:

    可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改"mysql" 数据库里的 "user" 表里的 "host"项,从"localhost"改称"%"

     1、启用 cmd 

    输入 : mysql -u -root -p 

    若是提示 ‘mysql’不是内部或外部命令,也不是可运行的程序.那需要配置环境变量  在配置 path 变量添加 “……mysq/MYSQL Server5.7in”

    总体运行语句:

    mysql -u root -p

    mysql>use mysql;

    mysql>select 'host' from user where user='root';

    mysql>update user set host = '%' where user ='root';

    mysql>flush privileges;

    mysql>select 'host'   from user where user='root';

     

    运行完毕后再次连接测试,若还不行重启mysql服务,或是直接重启电脑



  • 相关阅读:
    python(三):python自动化测试定位
    python(二):用python抓取指定网页
    python(一):介绍网络爬虫
    oracle批量增加数据
    oracle数据库基本操作
    web安全测试要点
    linux下安装jdk、tomcat
    在linux上编译C
    linux基本操作
    对首次性能测试的总结与思考
  • 原文地址:https://www.cnblogs.com/devan/p/7055339.html
Copyright © 2020-2023  润新知