Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

database.php page problems


ghost's Avatar
0 0

im having problems with my database.php page its supposed to connect with my mysql server here is the information givin to me by my hosting server The correct MySQL database settings are:

MySQL Host: mysql3.freehostia.com MySQL Port: 3306 MySQL Database: turcha_mysql MySQL Username: turcha MySQL Password: some pass

how do i add that info to this: <?

$conn = mysql_connect("mysql3.freehostia.com:3306", "turcha", "some pass") or die(mysql_error()); mysql_select_db('your_database', $conn) or die(mysql_error());

?>


ghost's Avatar
0 0

it keeps giving me this error Warning: mysql_connect(): Access denied for user 'turcha'@'hex12.freehostia.com' (using password: YES) in /home/www/arabian-outlaw.com/database.php on line 3 Access denied for user 'turcha'@'hex12.freehostia.com' (using password: YES)


ghost's Avatar
0 0

You don't actually need $conn unless you have multiple MySQL connections running on the same script


mysql_connect(&quot;mysql3.freehostia.com&quot;, &quot;turcha&quot;, &quot;some pass&quot;) or die(mysql_error());
mysql_select_db(&#39;your_database&#39;) or die(mysql_error());

?&gt;```

Try that

ghost's Avatar
0 0

it still gives me this error Warning: mysql_connect(): Access denied for user 'turcha'@'hex12.freehostia.com' (using password: YES) in /home/www/arabian-outlaw.com/database.php on line 3 Access denied for user 'turcha'@'hex12.freehostia.com' (using password: YES) i opened a ticket for help from the hosting


ghost's Avatar
0 0

did you give that user permission to access the db? that's what it sounds like to me.