What Port is MariaDB/MySQL On?

PHP/MariaDB/MySQL | Updated March 2026

MariaDB/MySQL runs on port 3306 by default on all Ultra Web Hosting servers. But since this is one of our most-visited articles, we've expanded it into a quick reference for every common port you might need when connecting to your hosting account.

01. Database Ports

Service Port Notes
MariaDB / MySQL 3306 Standard port. Use localhost for apps on the same server
PostgreSQL 5432 Available on VPS/dedicated plans

02. Email Ports

Service Port Encryption Notes
IMAP 993 SSL/TLS Recommended for incoming mail
IMAP 143 STARTTLS Alternative if 993 is blocked
POP3 995 SSL/TLS Downloads mail to device
POP3 110 STARTTLS Alternative if 995 is blocked
SMTP (outgoing) 465 SSL/TLS Recommended for sending mail
SMTP (outgoing) 587 STARTTLS Alternative if 465 is blocked
SMTP 25 None Blocked by most ISPs. Do not use for client connections
Tip

For complete email setup instructions, see our guides for iPhone/iPad, Android, Outlook, or our Email Troubleshooting Guide.

03. Web and Control Panel Ports

Service Port Notes
HTTP 80 Unencrypted web traffic (redirects to HTTPS)
HTTPS 443 Encrypted web traffic (standard)
cPanel 2083 HTTPS access to cPanel
Webmail 2096 HTTPS access to Roundcube webmail
WHM 2087 Server admin (resellers only)

04. FTP and File Transfer Ports

Service Port Notes
SFTP / SSH 22 Recommended. Encrypted file transfer
FTP 21 Use with Explicit TLS for encryption
FTP Passive Range 49152-65534 Used for FTP data connections in passive mode
Tip

We recommend SFTP (port 22) over FTP for all file transfers. It's encrypted and works through firewalls more reliably. See our FTP Client Setup Guide for instructions.

05. Connecting to MySQL Remotely

By default, MySQL connections are only allowed from localhost (the same server). If you need to connect from an external application, a local development machine, or a different server, you need to whitelist your IP address first.

  1. Log into cPanel - go to your hosting control panel
  2. Click "Remote MySQL" - in the Databases section
  3. Add your IP address - enter the IP you'll be connecting from. You can use % as a wildcard, but we don't recommend it for security reasons
  4. Connect with your database tool - use your server's hostname or IP, port 3306, and your database username/password from cPanel
Warning

Never add % (all IPs) to Remote MySQL unless you absolutely need it and your database user has a very strong password. It opens your database to connection attempts from anywhere on the internet. Always whitelist specific IPs instead.

Connection String Examples

# MySQL command line
mysql -h yourserver.ultrawebhosting.com -P 3306 -u dbuser -p dbname

# PHP (PDO)
$pdo = new PDO('mysql:host=yourserver.ultrawebhosting.com;port=3306;dbname=yourdb', 'user', 'pass');

# WordPress wp-config.php (local - most common)
define('DB_HOST', 'localhost');

# WordPress wp-config.php (remote)
define('DB_HOST', 'yourserver.ultrawebhosting.com:3306');

06. Common Port-Related Issues

"Can't Connect to MySQL Server on 'localhost'"

If your application can't connect to the database, the issue is almost never the port. The most common causes are: wrong database name (cPanel prefixes it with your username), wrong database user credentials, or the user hasn't been granted access to the database. Check all three in cPanel > MySQL Databases.

"Connection Timed Out" on Email Ports

If your email client times out when connecting, your ISP or network may be blocking the port. Try the alternative port (e.g., 587 instead of 465, or 143 instead of 993). Corporate and hotel Wi-Fi networks frequently block email ports. Test on a different network to confirm.

cPanel Won't Load on Port 2083

If you can't access cPanel at https://yourserver:2083, your IP may be blocked by the server firewall. Visit my.ultrawebhosting.com to unblock your IP, or try accessing through your client area which has a direct cPanel login link.

Need Help Connecting?

If you can't connect to a service on any of the ports listed above, open a ticket and let us know which service, port, and error message you're seeing.

Open a Support Ticket

Quick Recap: Common Ports

The ports you'll use most often:

  1. MySQL/MariaDB: 3306 - use localhost for same-server connections
  2. Email: 993 (IMAP), 465 (SMTP) - both with SSL/TLS
  3. SFTP: 22 - for encrypted file transfers
  4. cPanel: 2083 - HTTPS access to your control panel
  5. Web: 443 (HTTPS) - standard encrypted web traffic

Last updated March 2026 · Browse all Database articles

  • 1051 Users Found This Useful

Was this answer helpful?

Related Articles

phpMyAdmin - Error Incorrect format parameter

When importing a database with phpMyAdmin I receive the error "Error Incorrect format parameter"....

How do I import into a MariaDB - MySQL database?

import a database with Ultra Web Hosting phpMyAdmin: Log in to your control panel with...

Learn About MySQL

MySQL is a relational database management system (RDBMS) that is open-source and free to use. It...

The MySQL server is currently offline admin bin Cpanel/cpmysql/DBCACHE: exit 11

The error message...  The MySQL server is currently offline admin bin Cpanel/cpmysql/DBCACHE:...

Cannot Connect to MariaDB MySQL Database

PHP/MariaDB/MySQL | Updated March 2026 The "Could not connect to the database" error means...



Save 30% on web hosting - Use coupon code Hosting30