cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to database via PHP

Newbie
Posts: 1
Registered: ‎10-02-2009

Connect to database via PHP

Hi All, Please can anyone help, i am new to MYSQL, I have set up the database and created a table through PHPADMIN
I then created a small PHP script and put it on the CCGI site and ran it

<?php
$db_host='rumpus.force9.net';
$username='dadio';
$password='********';
$db_name='dadio_f9';
echo "<HTML><BODY>";
$conn = mysql_connect($db_host,$username,$password);
echo "</HTML></BODY>";
?>




unfortunately i keep getting the following error
Warning: mysql_connect(): Access denied for user 'dadio'@'212.159.7.156' (using password: YES) in /share/storage/02/da/dadio/testmatch.php on line 10
I have set the permissions to 755 for the php file, am i missing something obvious .... Please help
Sad

2 REPLIES 2
Grafter
Posts: 2,839
Registered: ‎13-06-2007

Re: Connect to database via PHP

That message normally means that the password in your script is incorrect. It would be worth raising this to our support team so they can reset the mysql password for you.
Grafter
Posts: 146
Registered: ‎30-07-2007

Re: Connect to database via PHP

Just make sure that they don't refresh the database component (as happened to me) and hey presto - no more database!