Forums
This topic is locked
mysql/php connection:
Posted 13 Sep 2006 15:48:16
1
has voted
13 Sep 2006 15:48:16 David Cuttriss posted:
Where am I going wrong. I know that my SQL database is there and that the username & password are correct by using this code:
<?php
$link = mysql_connect('localhost', 'wwwibdt_admin', 'IBD');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db(wwwibdt_members);
?>
which returns connected successfully.
However using dreamweaver 8 I cannot create a connection: whatever I do I get is an error: 404
1. There is no testing server runnning on the server machine
2. the tsting server......does not map to http:ftp.mysite.com/_mmServerScripts/MMHTTPDB URL.........
My test Server is set up as:
Server model: PHP
Access: FTP
FTP hOst: ftp.mysite.com
Host Directory: public_html
log in: password etc all correct and a test reports successful connection.
my attempted connection is as follows:
Connnection: admin1
MySQL server: localhost
username wwwibdt_admin
password *** (correct)
Testing server is on the remote server.
Any one who can point me in the right direction will have undying thanks!
Dave
Replies
Replied 13 Sep 2006 16:57:55
13 Sep 2006 16:57:55 David Cuttriss replied:
As always: the URL was incorrect for the remote server. I'd looked at it at least 50 times....seing the wood for the trees?
Replied 13 Sep 2006 16:58:29
13 Sep 2006 16:58:29 Roddy Dairion replied:
Is the server on your machine itself? If no then does you're hosting allow remote connections to their mysql server? If no then the problem is there, if yes then check the Mysql server connection settings.
Replied 13 Sep 2006 17:08:34
13 Sep 2006 17:08:34 David Cuttriss replied:
Thanks Roddy: like I said it was my screw up on URL's. Thanks for your time though: Appreciated
Dave
Dave