ufw ubuntu防火牆

1.查看ufw statusmysql

2.打開ufw allow 3306sql

3.關閉ufw deny 3306 數據庫

vim /etc/mysql/my.cnf
skip_xxxxx
bind 127.0.0.1
找到這兩行。
vim /etc/mysql/my.cnf
 >>>>>>>>>>>>>>
     # 註釋掉本地IP幫頂這句
     # bind-address = 127.0.0.1
     # mysqld 區段下添加:
     skip-name-resolvevim


重啓數據庫
ip

相關文章
相關標籤/搜索