Monday, October 14, 2013

How to Find the Hostname of a Database Server?

Some web software for a website needs the value of the hostname of a database server for it to be installed to a web server, such as WordPress (software) which needs MySQL database connection details. The MySQL database hostname will usually be "localhost" on most web hosting companies, but not always!

The name could be simply "localhost" if your database is local to your web server or to the server on your hosting provider. But if your database is external to your web server or to your hosting server, then you or your hosting provider would need to put the name of that database.

Most Hosting Providers

To be sure about your database hostname, here we will going to find the exact hostname of MySQL server through the application called phpMyAdmin, version 4.0.5:

  1. First, log in to your control panel.
  2. Find the PHP application "phpMyAdmin":
    The Application 'phpMyAdmin' on the Home of cPanel
    • On the Databases heading section if you're using cPanel.
    • Or on the Advanced Features heading section if you're using DirectAdmin Web Control Panel.
    And then click it to run that application.
  3. And in phpMyAdmin, the value of the item "Server" on the top of the user interface, is your database hostname.
    The Database Hostname on the Application Interface of phpMyAdmin Version 4.0.5
    Which in the case on the image above, is "localhost".

Some Hosting Companies

On the control panels of some hosting providers, you could see the database hostname on such as "Databases" area like if you're using Parallels Plesk Panel:

  • While adding a new database.
    1. In the "Databases" area on the Websites & Domains heading section.
    2. When you “Add New Database”.
  • Or in the databases area.
    1. Just click the "Databases" on the Websites & Domains heading section.
    2. And when you already have created database therein the list.

There you will see the field Database server and the value of it is your DB hostname, which is “Local MySQL server” in default.

On Hepsia Control Panel

If you're using Hepsia Control Panel, the hostname of your MySQL Server can be seen by the following:

  • In the Home, at the list MySQL Server of the System info heading section.
  • Or click on “MySQL Databases” under the Databases drop-down menu. And it may now seen as the value of MySQL Server.
  • Or in the application named "MySQL" on the General heading section, and it's printed at the MySQL Server on MySQL Databases.

And the hostname on Hepsia is just "localhost".

If you couldn't find your database hostname by following such as the guidelines above, I recommend you to contact your technical support or search the online documentation of your web hosting provider about your database hostname to make it sure.

1 comment:

You can use some HTML tags, such as <b>, <i> and <a> tags, but please do not spam.