TCP port 3306 is the default port for MySQL.
A port is a transport layer number used together with an IP address and a protocol such as TCP or UDP to direct traffic to the correct service on a host.
A server process binds a socket to a port and listens, while a client typically chooses an ephemeral source port for outbound connections.
The combination of source and destination IP addresses, source and destination ports, and the transport protocol uniquely identifies a flow so the operating system can keep many conversations separate.
Firewalls, NAT, and scanners talk about ports because the destination port is the stable rendezvous point that exposes a service to the network.
A MySQL server binds to 3306 and client applications connect from ephemeral source ports.
After the TCP handshake, the MySQL protocol handshake exchanges capabilities and authentication data, and then the client sends SQL queries while the server returns result sets.
In real applications, connection pools keep sessions open for performance, so database exposure is often long lived and predictable, which helps defenders baseline normal behavior.
Security wise, 3306 should rarely be reachable from end user networks or the internet.
If it is exposed, attackers can brute force accounts, exploit vulnerable server versions, or abuse overly privileged application credentials to exfiltrate data.