zoukankan      html  css  js  c++  java
  • mysql 开放远程连接 & 开放防火墙端口

    感谢:

      https://www.cnblogs.com/feigao/p/10715547.html

      

    Mysql默认不允许远程登录,所以需要开启远程访问权限

         可以先查看user表

         select user,authentication_string,host from user;

         

         默认都是localhost

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

          

          此时root的host是所有都可以了

          然后刷新修改,FLUSH PRIVILEGES;

          这步一定要做,否则无法生效。

    防火墙开启

    1、开启端口3306

    firewall-cmd --zone=public --add-port=3306/tcp --permanent

    2、重启防火墙

    firewall-cmd --reload

    查看已经开放的端口:

    firewall-cmd --list-ports

      

  • 相关阅读:
    Python-time和datetime模块
    Python-hashlib模块
    Python-利用flask模块创建web接口
    Python-操作Excel
    2
    1
    8
    7
    HDFS元数据管理实战篇
    使用HttpFS网关从防火墙后面访问HDFS
  • 原文地址:https://www.cnblogs.com/yang1314/p/14505262.html
Copyright © 2011-2022 走看看