Database Hostname is often needed when you’re installing Content Management Systems, such as – WordPress, Joomla, Drupal etc.
If you don’t know what is Database Hostname, it refers to the physical location of your database. For your website to connect to your database, you need its hostname.
Here’s an example of how database hostname is used during WordPress installation. If you open wp-config.php file you can see this line,
define('DB_HOST', 'DatabaseHostHere'); // Sample MySQL Database Host
So in the place “DatabaseHostHere” you’ll be using your respective hostname, if you are using HostGator, you’ll be using “localhost” or 1and1 you’ll be using “db123123431” (sample numbers). It actually depends on where your host keeps your database.
Hostname of Database server, as you might be thinking, is not “localhost” for all, though “localhost” is used largely. Different hosts keep different names, and it is quite complicated to find hostname of the database server. So here, I gathered some Hosting Companies and their Database Hostname.
How to Find Hostname Of Database Server
Below I have mentioned some Hosting Companies and their respective DB_HOST values.
|Hosting Company||DB_HOST Value Guess|
|A Small Orange||localhost|
|GoDaddy||Go to MySQL and edit the database to find the server name.|
|Hosts with cPanel||localhost|
|Hosts with Plesk||localhost|
|Hosts with DirectAdmin||localhost|
I took this table from WordPress Codex displaying the possible DB_HOST values. Remember different hosting companies use different network settings for their MySQL databases, so always be careful.
If you are still confused about finding your DB_HOST (Database Host) you can contact your Host’s Customer Support and they’ll help you with it.
Hope this helps you to find your Database Host. Don’t forget to share it with others. And let me know through comments if you face any difficulties finding your hostname of Database server.
13 thoughts on “How To Find Hostname Of Your Database Server”
this is a lifesaver about ipage sql host name
informative i was looking for the same on my server and found after reading your post.
When i try to direct access this url (username).ipagemysql.com its redirect me to http://ww1.username.ipagemysql.com/. If anyone have any suggestion kindly tell what should i do now?
here is my (username) is my database username.
I think you can’t directly access this url. It’s mainly if you are setting up any database you gotta provide access credentials, and there as DB_HOST you have to provide “username.ipagemysql.com”.
while setting Joomla configuration, this article save my day, thanks
Hi, you can add for “iPage: username.ipagemysql.com”
ipage Data Name is unique – go to your cpanel – then mysql database – find the generate code column and hit the black board icon – that should give you your hostname. tada!!!!
iPage Database name is ilivesg.ipagemysql.com
Yeah hostnames of database server differs with hosting providers.. this is the main issue for newbie’s as they don’t know much tech stuff.
Nice info…once I have used local host while installing wordpress manually..
Was searching for iPage, but couldn’t find it either. Will contact technical support now..
Probably you already have the answer, but anyway it’s “username.ipagemysql.com”
You’re a freaking life saver! [username].ipagemysql.com was it!