久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      CentOS中MySQL無法遠程連接怎么處理

      Centos7系統(tǒng)下怎么也不能遠程連接mysql,下面就介紹下如何解決,供同樣遇到這個問題的朋友們參考學習。

      CentOS中MySQL無法遠程連接怎么處理

      CentOS中MySQL無法遠程連接怎么處理

      MySQL數(shù)據(jù)庫無法遠程連接有兩種原因:

      1、數(shù)據(jù)庫沒有授權

      2、服務器防火墻沒有開放3306端口

      推薦學習:Linux視頻教程

      具體的解決方法如下:

      一、數(shù)據(jù)庫沒有授權

      對于mysql數(shù)據(jù)庫沒有授權,只需要用2條命令就可以了。

      mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; mysql>FLUSH PRIVILEGES;

      二、服務器防火墻沒有開放3306端口

      centos 有兩種防火墻 Firewalld和iptables防火墻,centos7 使用的是Firewalld防火墻。

      Firewalld 是 iptables 的前端控制器,用于實現(xiàn)持久的網(wǎng)絡流量規(guī)則。它提供命令行和圖形界面,在大多數(shù) Linux 發(fā)行版的倉庫中都有。

      1、FirewallD防火墻開放3306端口

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

      命令含義:

      –zone #作用域

      –add-port=3306/tcp #添加端口,格式為:端口/通訊協(xié)議

      –permanent #永久生效,沒有此參數(shù)重啟后失效

      重啟防火墻

      systemctl restart firewalld.service

      2、iptables 開發(fā)3306端口

      /sbin/iptables -I INPUT -p tcp -dport 3306 -j ACCEPT /etc/rc.d/init.d/iptables save

      本篇文章來自PHP中文網(wǎng),CentOS使用教程欄目,

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號