Typical port numbers and protocols

– TCP 20: FTP
– TCP 21: FTP
– TCP 22: SSH
– TCP 23: Telnet
– TCP 25: SMTP
– UDP 53: DNS
– UDP 67: DHCP(server)
– UDP 68: DHCP(client)
– TCP 80: HTTP
– TCP 110: POP3
– UDP 123: NTP
– TCP 443: HTTPS
– WELL KNOWN PORT NUMBER 0-1023

When connecting to MySQL from the command line, you can specify the port number to connect to.
Use the -P option to specify a port number.
When port number specification is omitted (connected to default port number 3306)
[vagrant@localhost ~]$ mysql -u root -p
Enter password:

When specifying port number explicitly

[vagrant@localhost ~]$ mysql -u root -p -P 3306
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.6.44 MySQL Community Server (GPL)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> Ctrl-C — exit!
Aborted