Skip to main content
Participant
Apr 26, 2006 2:59 AM UTC
Question

MySQL connection Failure !!


I am unable to connect to MySQL database hosted on a remote server. I get the following error message:

"HTTP Error Code 404 File Not Found. Here are some possible reason for the problem:

1) There is no testing server running on the server machine.
2) The testing server specified for this site does not map to the http://72.9.255.2/~keyitems/_mmServerScripts/MMHTTPDB.php URL. Verify that the URL Prefix maps to the root of the site."

I have specified a testing server. My url is " http://72.9.255.2/~keyitems/........."

For the URL prefix to the site's root folder, I listed the following:

1. http://72.9.255.2/~keyitems/ this did not work. I got the above error message.
2. http://72.9.255.2/ this did not work also. I got the above error message.

Any input would be great as I do not know where to start !!! Thank you

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Participant
Apr 27, 2006 5:16 PM UTC
I had a similiar problem. On the connections page in Dreamweaver (in my case "conn_newland.php"), DM generates the following code to connect to your local testing server (localhost):
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn_newland = "localhost";
$database_conn_newland = "newland_tours";
$username_conn_newland = "root";
$password_conn_newland = "";
$conn_newland = mysql_pconnect($hostname_conn_newland, $username_conn_newland, $password_conn_newland) or trigger_error(mysql_error(),E_USER_ERROR);

BUT when you upload everything to a remote server, you need to change the connection information to point to the remote location where the MySQL file is and put in your database name, your user name and user password for the remote server. You can see from the changes below. Talk to your ISP to get the correct information.


<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn_newland = "mysql.MYWEBSITE.com";
$database_conn_newland = "NAME OF DATABASE ON REMOTE SERVER";
$username_conn_newland = "YOUR USER NAME ON REMOTE SERVER";
$password_conn_newland = "YOUR USER PASSWORD ON REMOTE SERVER";
$conn_newland = mysql_pconnect($hostname_conn_newland, $username_conn_newland, $password_conn_newland) or trigger_error(mysql_error(),E_USER_ERROR);
?> Text

Regards,
Translate
Mac_User7Author
Participant
Apr 28, 2006 2:19 AM UTC
I tried your suggestion but I still get the same error. I think the problem lies in my root directory. I did contact my web host andasked them about my root folder and I tried to use that but I still get the same error. Thank you anyways..

cheers
Translate