Behind the name · Beginner · 5 minutes
How to create a MySQL database — Four Connection Values, and Not One of Them Is Your Domain
Every installer asks for a host, and everybody who thinks in domain names types the wrong thing into it.
The short answer
An installer wants four values: host, database name, username and password. The host is localhost wherever the application runs on the same account — not your domain, because a database connection never travels through DNS at all. The other three come from the panel's database wizard, which creates the database, creates the user and grants one to the other in a single pass. Allow 5 minutes at beginner level.
Skip the wizard and the step that goes missing is always the grant. The application then reports 'access denied', which is indistinguishable from a mistyped password even when both credentials are perfect.
By the Hosting & Domains team · Reviewed 24 August 2026
Beginner
Level assumed
5 minutes
Time to allow
5
Stages to work through
24/7
Desk hours
Written for whoever holds the name rather than for whoever runs the server. Registry, registrar, DNS host and mail host are kept apart throughout, because most of the confusion in this subject comes from treating the four as one thing.
Read the part about what goes wrong before you open a zone editor. Nearly every ticket this topic produces arrives from somebody who reached that part second.
Four values, and none of them is your domain name
Host, database name, username, password. Every installer form you will ever meet is asking for those four, and only the first causes trouble. It causes trouble because it is called 'host', which sounds like it wants a name, and you have a perfectly good name sitting right there.
It does not want that. The connection is between two processes on the same machine, negotiated locally, and your domain has nothing to do with it. The word host in this context means the database server, not the site.
Why localhost, and when the hostname is right
Where the application runs on the same hosting account as the database — which covers WordPress and almost everything else installed through the panel — the value is localhost. That resolves inside the machine and never touches a resolver, a zone or a nameserver.
The exception is connecting from outside: a desktop MySQL client, or an application on another server. That needs the server's hostname and it needs your IP address registered under Remote MySQL first, because external access is switched on deliberately rather than assumed. Putting your domain in the host field may appear to work in that scenario, and it breaks the moment the A record moves.
The prefix, and a name you will still recognise
The panel prepends your account name automatically, so what you type becomes account_yourhalf. Make your half describe what the database contains, ideally the site it belongs to.
Come back in six months to a list containing db1, test and wp2 and you will have no way of telling which name each one serves. One application, one database, always — two applications sharing a database saves nothing and turns every backup and restore into an argument about which tables belong to whom.
The grant is the step that vanishes
The wizard does three things in order: creates the database, creates the user, grants the user privileges on that database. Doing it by hand from the separate screens is exactly how the third one gets forgotten.
An application wants full authority over its own database. Limited accounts have their uses — read-only reporting, for one — but installation is not among them. When the app says access denied, check the grant before you go anywhere near the password.

Where the account does this part for you
Guides written against a hypothetical registrar age badly. These were written at the same zone editor, client area and deliverability screen your own account opens on.
Already hosted elsewhere? We move the whole site at no charge, usually within 24 hours, and it keeps answering visitors the entire time.
- Registry, registrar, DNS host and mail host kept apart
- Every record shown at the name it belongs on
- The clock on each change stated as a number
- A desk that answers at any hour you stall
Why Hosting & Domains
Standard on every plan
The way back, printed beside the way in
Anything carrying a clock or a lock is marked, together with exactly how to reverse it.
The silent failure, named first
The mistake this task actually produces is described before step one, which is how 5 minutes stays 5 minutes.
Checked at the panel, not imagined
Every instruction was carried out on the platform we run, against a name delegated to our own nameservers. No 'your provider may differ' hedging.
Help on your clock, not ours
Stuck at the zone editor at midnight? The desk answers at any hour, mid-walkthrough included.
Stages, not padding
Each stage is a few minutes of careful clicking, and the parts that genuinely need care are marked as such.
Honest about the size of it
Creating a database, a user and the grant between them is beginner-level work — allow 5 minutes, with the stages the account already handles marked as such.
Quick Start
Order placed to site online
- 1
Use the wizard so none of the three jobs goes missing
It takes database, user and grant in order, in one pass. Working from the separate screens is the reliable way to end up with two of the three and a puzzling error message.
- 2
Name it after the site it serves
The panel adds account_ as a prefix automatically, so your half should say what the database is for. Six months from now, db1 and test will tell you nothing about which name they belong to.
- 3
Generate the password in the panel and file it
Let the panel produce it, then put it in your password manager and into the application's config file. Database credentials are infrastructure and nobody should be attempting to memorise them.
- 4
Grant the user everything on its own database
An application needs full authority over the database it owns. Restricted accounts exist for reporting and similar jobs, and an installation is not one of those jobs.
- 5
Write down the four values, with localhost as the host
Host, database name, username, password. The host is localhost while the application sits on the same account — the server hostname only where you are connecting from outside, and only after registering your IP under Remote MySQL.
Built In
Fitted to every plan
- WebP image optimisation built in, at no extra charge
- Your existing site brought across by our engineers at no charge
- A daily copy of the account, restored from the panel by you
- NVMe SSD storage on every tier, not only the expensive ones
- LiteSpeed caching built into the server rather than bolted on by plugin
- DDoS filtering absorbed at the network edge
- cPanel, the panel most of the industry already standardised on
- Spam and virus screening on every mailbox by default
- 99.9% uptime as the target, watched around the clock
- WordPress Toolkit, with the updates seen to for you
Frequently Asked
Questions we field again and again
Should the host field be my domain name?
No. Where the application runs on the same hosting account, it is localhost — the connection is made inside the machine and never goes near a resolver, a zone or a nameserver. Your domain belongs in the site's own configuration, not in the database connection. The only time a hostname is correct here is a connection from outside, which needs the server's hostname and your IP registered under Remote MySQL.
The site is moving to a new domain. Does the database connection change?
The connection does not — it is local and has nothing to do with which name the site answers on. What does change is the data inside: WordPress stores the old hostname in siteurl and home, and again in absolute URLs across hundreds of rows. That is a job for a proper search-replace, not for the connection settings.
How do payments and auto-renewal work?
By credit or debit card through a secure checkout, and renewals bill at the same rate as the original order. Every invoice sits in your client area, and auto-renewal is a toggle in the account — worth leaving on for any name a live site depends on.
What happens if the account outgrows its plan?
You upgrade in place. Plan changes happen from the client area with no migration and no downtime, and the range runs from small shared accounts through VPS to full dedicated machines — so growth is a setting rather than another DNS change.
Keep reading
How to Choose a Domain Name
Land on a name that still sounds right after years of saying it out loud — beginner, about an evening of thought.
Secure Hosting
Imunify360, isolated accounts and hardened defaults for security-first builds.
Web Hosting
cPanel hosting on NVMe drives, with SSL, the migration and year one of the name included.
Changing provider? Work through this checklist beforehand.
A straightforward running order for a migration your visitors never spot: which files travel first, how to bring the mail across without dropping a single message, the right moment to repoint DNS, and the two errors that sit behind almost every outage we get called in to fix.
The name is still free. Take it.
Free SSL, a free migration, renewals billed at the original rate, and a desk staffed around the clock. That is the whole of the offer.
View Secure Hosting plans