How To Find Hostname Of Your Database Server

Find Hostname Of Database Server

Find Hostname Your Database Server

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
1and1  db12345678
AN Hosting  localhost
A Small Orange  localhost
BlueHost  localhost
DreamHost  mysql.example.com
GoDaddy  Go to MySQL and edit the database to find the server name.
HostGator  localhost
HostICan  localhost
ICDSoft  localhost:/tmp/mysql5.sock
IPower  username.ipowermysql.com
LaughingSquid  localhost
MediaTemple GridServer  internal-db.s44441.gridserver.com
MediaTemple (dv)  localhost
MegnaHost  localhost
NearlyFreeSpeech.Net  username.db
one.com  localhost
pair Networks  dbnnnx.pair.com
Rackspace Cloud  mysql50-01.wc1.dfw1.stabletransit.com
Yahoo  mysql
Hosts with cPanel  localhost
Hosts with Plesk  localhost
Hosts with DirectAdmin  localhost
Tophost.it  sql.your-domain-name.it

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.

Comments

13 responses to “How To Find Hostname Of Your Database Server”

  1. this is a lifesaver about ipage sql host name

  2. shamsher khan blog Avatar
    shamsher khan blog

    informative i was looking for the same on my server and found after reading your post.

  3. Muhammad Ashar Avatar
    Muhammad Ashar

    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.

    1. 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”.

  4. Rishi Sanuj Avatar
    Rishi Sanuj

    while setting Joomla configuration, this article save my day, thanks

  5. johnshumon Avatar
    johnshumon

    Hi, you can add for “iPage: username.ipagemysql.com”

  6. Charity Santos Avatar
    Charity Santos

    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!!!!

  7. I dont want to disclose my info THanks Avatar
    I dont want to disclose my info THanks

    iPage Database name is ilivesg.ipagemysql.com

  8. Rohit Batra Avatar
    Rohit Batra

    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.

  9. Nice info…once I have used local host while installing wordpress manually..

  10. Gaurang Avatar

    Was searching for iPage, but couldn’t find it either. Will contact technical support now..

    1. johnshumon Avatar
      johnshumon

      Probably you already have the answer, but anyway it’s “username.ipagemysql.com”

      1. You’re a freaking life saver! [username].ipagemysql.com was it!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.