Skip to content

Do I use localhost or remotemysqlhost for my mysql connection?

Updated 1 min read

Updated: 28 September 2026

Use localhost. On our cPanel hosting, the database server runs on the same server as your website.

  • Database host: localhost (port 3306 if asked)
  • Database name and username: the full names shown in Databases › Manage My Databases, including the username_ prefix.

Only use a different host name if our support team gives you one. To connect from outside the server (for example from your computer), see "How can I access mysql database remotely?".

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Linux server management

hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.

Was this answer helpful?

Still stuck? Open a ticket