How to check whether port 3306 of the firewall is open and how to open it

1. Check whether the port is open: You can check it through the command line or telnet.

Command line: Enter "netstat -an" (without quotation marks) in the command prompt of the Windows system to view all open port numbers, where 3306 is the default port number of the MySQL database service, and if "LISTENING" is displayed, it means The port is already occupied and in listening state.

Operation: 1》Click the windows icon in the lower left corner of the computer, enter "cmd" to open

 2》Enter "netstat -an" in the cmd window and press Enter

netstat -an

 

Telnet method: Enter "telnet IP address 3306" (without quotation marks) in the command line, if it returns "Connected to MySQL server", it means the port is open, if it returns "Unable to connect to remote host: Connection refused", it means the port Not open.

2. How to open port 3306:

  • First, you need to enter the firewall management page, which is usually "Control Panel" - "Windows Firewall" under Windows.

a> Click the windows icon in the lower left corner of the computer, enter "control panel" to open

 

  • Click "Advanced Settings" or similar options to enter the advanced settings interface.

 

  • Select "Inbound Rules" on the left, and click "New Rule".

 

  • Select the "Port" type and fill in the port number 3306.

 

 

  • Set the IP addresses or ranges that are allowed to connect.
  • Set the allowed network types.
  • Set the rule name and description information.
  • Click the "Finish" button to save the settings.
  • Verify that the port is open.

Guess you like

Origin blog.csdn.net/qq_45991812/article/details/132225718