How To Find Hostname Of Your 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 CompanyDB_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.

Sharing is Caring
Imtiaz Rayhan
 

Blogger, WordPress Enthusiast. I have few years of experiences with web hosting that I intend to share with others. Add me on Facebook

Click Here to Leave a Comment Below 13 comments
ajay

this is a lifesaver about ipage sql host name

Reply
shamsher khan blog

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

Reply
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.

Reply
    Shumon

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

    Reply
Rishi Sanuj

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

Reply
johnshumon

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

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

Reply
I dont want to disclose my info THanks

iPage Database name is ilivesg.ipagemysql.com

Reply
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.

Reply
Anil

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

Reply
Gaurang

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

Reply

Leave a Reply: