Won't connect to the database
- by user1657958
I'm confused...I'm using the same code in a different document and in there it's not a problem to get a connection to the database.
But in the new document it's just not working...(password, username, database name...all is checked and correct) :-/
<?php
define ("DB_HOST", "db1234567.db.hello.com"); // set database host
define ("DB_USER", "db1234567"); // set database user
define ("DB_PASS","password123"); // set database password
define ("DB_NAME","db1234567"); // set database name
$link = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("Couldn't make connection.");
$db = mysql_select_db(DB_NAME, $link) or die("Couldn't select database");
?>
In the browser I get this: "Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'db1234567'@'123.123.12.12 (using password: YES) in /homepages/12/1234567/test/test.php on line 8
Couldn't make connection."
Would be cool if someone could help me :) I'm not seeing any error...
Thx!