Locating Your Godady Database's Host

Do not use "localhost" as the hostname for your database-driven websites on shared hosting accout. Once you have successfully created a database, your host name displays on the Database Information page of your hosting Control Panel.
To Find the Host Name for Your Database
  1. Log in to your Account Manager.
  2. Click Web Hosting.
  3. Next to the hosting account you want to use, click Launch.
  4. In the Databases section of the hosting Control Panel, click MySQL or MSSQL depending on the database type for which you want the host name.
  5. From your list of databases, click Actions next to the database you want to use, and then click Details.

Your database host name displays in the Hostname field.

Then you can configure your scripts and connect to the database as needed.<!>

This is how it looks

Godaddy Database Details


For Example

define ("DBASE_HOST","go daddy hostname");

define ("DBASE_USERNAME","admin"); 
define ("DBASE_PASSWORD","your pasword"); 
define ("DBASE_NAME","your database name");

function open_dbase()

  // connect to the mysql server

  if (!$link) {
    die('Could not connect: ' . mysql_error());

  // select the database
  return $link;

function close_dbase($link)