# Can't connect to my live server database

**URL:** https://forum.kirupa.com/t/cant-connect-to-my-live-server-database/330459
**Category:** Uncategorized
**Created:** [January 24, 2013, 10:33pm UTC](https://forum.kirupa.com/t/cant-connect-to-my-live-server-database/330459 "2013-01-24T22:33:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bracelett](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@bracelett](https://forum.kirupa.com/u/bracelett)
#### Post date: [January 24, 2013, 10:33pm UTC](https://forum.kirupa.com/t/cant-connect-to-my-live-server-database/330459/1 "2013-01-24T22:33:08Z")

</div>

I have this information provided by my hosting company the details one of my database on my live server.I created already my database and table in phpmyadmin and I put right information given by my hosting company but still I can’t connect. I created a quick text in php to make sure I’m connected to my database which is in my live server, but I’m failed. here is my quick test connect php code.

```php
<?php
include_once "dbconnect.php";
echo "<br /><h2>You are successfully connected to your database.</h2><br /><br />";?>

```

and here is my database connection php code: dbconnect.php

```php
<?php
$db_host = "db452173471.db.1and1.com";
$db_username = "dbo452173471";
$db_pass = " ************";
$db_name = "db452173471";
mysql_connect("$db_host","$db_username","$db_pass") or die(mysql_error());mysql_select_db("$db_name") or die("no database by that name");?>

```

when I try to connect it directly to my browser, [http://www.mysite.com/quickconnect.php](http://www.mysite.com/quickconnect.php)  
the result is this: “[COLOR=#000000][FONT=Times New Roman]Access denied for user ‘dbo452173471’@‘74.208.16.84’ (using password: YES)”

below I attached my database info jpeg format:[/FONT][/COLOR]
