Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Connect to database via PHP
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Connect to database via PHP
Connect to database via PHP
10-02-2009 5:05 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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
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
Message 1 of 3
(1,024 Views)
2 REPLIES 2
Re: Connect to database via PHP
11-02-2009 1:27 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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.
Message 2 of 3
(338 Views)
Re: Connect to database via PHP
12-02-2009 9:45 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Just make sure that they don't refresh the database component (as happened to me) and hey presto - no more database!
Message 3 of 3
(338 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Connect to database via PHP