MariaDB/MySQL runs on port 3306 by default on all Ultra Web Hosting servers. For applications running on the same server (WordPress, Joomla, etc.), use localhost as the database host.
MariaDB/MySQL Port: 3306
All Ultra Web Hosting servers use the standard MariaDB/MySQL port.
- ✓ MySQL/MariaDB: port 3306
- ✓ Database host for local apps: localhost
- ✓ phpMyAdmin: accessible through cPanel (no port needed)
- ✓ Remote MySQL: must be enabled in cPanel first
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. 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.
- Log into cPanel - go to your hosting control panel
- Click "Remote MySQL" - in the Databases section
- 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 - Connect with your database tool - use your server's hostname or IP, port 3306, and your database username/password from cPanel
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');
03. Common MySQL Connection 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. See Cannot Connect to MySQL and Error 2003.
"Connection Refused" on Port 3306
If connecting remotely and getting connection refused, make sure you have added your IP in cPanel > Remote MySQL. Also verify your IP has not been blocked by the firewall. Check with the Firewall Unblock tool.
For other port references: email ports (993, 465, 587), FTP ports (21, 22), cPanel port (2083).
Cannot Connect to Your Database?
Open a ticket with the error message and we will check the connection for you.
Open a Support TicketQuick Recap
- MySQL/MariaDB: port 3306
- Use
localhostfor same-server connections - Enable Remote MySQL in cPanel to connect externally
- Whitelist specific IPs, never use % wildcard
- Check cPanel > MySQL Databases for credentials and user assignment
Database connection reference · Last updated March 2026 · Browse all Database articles
