ShareYourGroupShareYourGroupSubnet and Ports

Database ports: MySQL 3306, PostgreSQL 5432, MongoDB 27017, Redis 6379 and others

What the IANA registry records for these ports, and how to use them safely.

What IANA records

PortProtocolsRegistered nameIANA descriptionAssigneeReferenceNote
1433tcp, udpms-sql-sMicrosoft-SQL-Servern/an/a
1521tcp, udpncube-lmnCube License ManagerMaxine Yuenn/aUnauthorized Use Known on port 1521
3306tcp, udpmysqlMySQLMontyn/a
5432tcp, udppostgresqlPostgreSQL DatabaseTom Lanen/a
27017tcpmongodbMongo database systemMongoDB Inc.n/a
6379tcpredisAn advanced key-value cache and storeSalvatore Sanfilippon/a

The defaults

PortDatabase
1433Microsoft SQL Server
1521Oracle
3306MySQL and MariaDB
5432PostgreSQL
27017MongoDB
6379Redis

These are defaults from the registry and from the products' conventions; each can be changed in the configuration.

The most important rule

A database should talk only to the application servers that need it. If a database port is open to the whole internet, anyone can try to log in, and several databases have, in the past, been installed with no password at all, which led to many public data leaks. Check your own servers: the lists of open ports tell you.

Safe habits

  1. Bind the database to a private address (or localhost) in its configuration, not to every address.
  2. Block the port in the firewall except from the application servers.
  3. Use strong passwords and separate accounts for each application with the minimum rights.
  4. Turn on encryption for connections that cross a network.
  5. Do not use default accounts and empty passwords. Redis in particular is often set up without a password for convenience; set one.
  6. Back up and test the restore.

For developers on a laptop

Connecting to a remote database from your laptop? Use an SSH tunnel or a VPN rather than opening the database port to the internet.

This is an independent guide. It is not connected with IANA, the IETF or any network equipment maker. Address and port data come from the IANA registries as fetched on 14 November 2026; RFC texts were read from rfc-editor.org. Check the originals for anything you rely on.