- MySQL
- PostgreSQL
Allow remote connections (optional)
By default both databases only accept connections fromlocalhost, which is the safest setup. If your app runs on the same VPS, leave it that way. If you truly need remote access:
- Bind the database to
0.0.0.0in its config (/etc/mysql/mysql.conf.d/mysqld.cnfor/etc/postgresql/*/main/postgresql.conf). - Update the client authentication file (
pg_hba.conffor PostgreSQL). - Open the port in your firewall. See Firewall.
- Restart the service.
