"MySQL" configuration firewall, allow external access

Source: Internet
Author: User

CentOS 7.1 Version


View Firewalld

[Email protected] sysconfig]# systemctl status Firewalld

firewalld.service-firewalld-dynamic Firewall daemon

Loaded:loaded (/usr/lib/systemd/system/firewalld.service; enabled)

Active: Active (running) since six 2015-07-04 20:56:57 CST; 1min 52s ago

Main pid:8911 (FIREWALLD)

CGroup:/system.slice/firewalld.service

└─8911/usr/bin/python-es/usr/sbin/firewalld--nofork--nopid


July 20:56:57 wode006 systemd[1]: Started firewalld-dynamic firewall D...N.

Hint:some lines were ellipsized, use-l to show on full.

[Email protected] sysconfig]#


View Zone

[Email protected] sysconfig]# Firewall-cmd--get-active-zones

Public

INTERFACES:ENP7S0F0 ENP7S0F1

[Email protected] sysconfig]#


Add Port 3306 and restart

[Email protected] sysconfig]# firewall-cmd--permanent--zone=public--add-port=3306/tcp

Success

[Email protected] sysconfig]# firewall-cmd--permanent--zone=public--add-port=3306/udp

Success

[Email protected] sysconfig]# Firewall-cmd--reload

Success

[Email protected] sysconfig]#


Test


"MySQL" configuration firewall, allow external access

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.