連接Linux服務器中數據庫權限問題

1.數據庫權限問題:開放權限

grant [權限] on [數據庫名].[表名] to ['用戶名']@['web服務器的ip地址'] identified by ['密碼'];

  • grant all on *.* to 'root'@'%' identified by 'root';

或者指定IP地址

  • grant all on *.* to 'root'@'192.168.1.103' identified by 'root';

 

2.Linux防火牆

臨時關閉 :當Linux服務器重啓時防火牆重新啓動

  • service iptables stop 關閉防火牆
  • service iptables start  啓動防火牆
  • systemctl status firewalld --查看防火牆狀態
  • systemctl start firewalld --開啓防火牆
  • systemctl stop firewalld --關閉防火牆

永久關閉:

  • chkconfig iptables off  關閉
  • chkconfig iptables on  開啓

 

3.本身主機防火牆問題

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章