Solved

Problem establishing database connection

Posted on 2004-08-27
6
438 Views
Last Modified: 2008-03-04
I am working in Windows XP and have Apache2, mySQL 3.x, and PHP5 installed. These are all working properly. I have created my mySQL database structure from the command line so I know that my username and password have all permissions. I know PHP is running as I am able to get my browser to display the PHP info page.

I have created a new site in Dreamweaver MX but am unable to create a connection to my database. The site name is: NBS_Site. It is enabled to use PHP MySQL. Editing and testing are on my local machine. The path to where files are to be 'stored' is: C:\NBS_Site_Store\. The URL used to browse to the root of the site is: http://localhost/NBS_Site/. No remote access info was input as I am not using a remote computer. The server root in Apache's config file is: ServerRoot "C:/Program Files/Apache Group/Apache2". The path to the directory NBS_Site is:  C:\Program Files\Apache Group\Apache2\htdocs\NBS_Site.

When I try to create a connection, I get a message, HTTP Error Code 404. One thing it suggests is that  "... the specified server doesn't map to http://localhost/NBS_Site/_mmServerScript/MMHTTPDB.php. Verify that URL prefix maps to root of the site."  How can I verify that? And if not, how can I change it so that it does?
I need this answer quickly if possible as I want to work through Dreamweaver on this project and can't move on it until I can connect.
Thanks for any help!
0
Comment
Question by:andem
  • 3
6 Comments
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11913172
FIrst thing to check is testing server.  It must be setup to allow connection of the database.  it should be setup to localhost or a version of that.  You may have to test it a couple of ways to get it, but it has to be correct BEFORE you can get a connection useing MYSql.

Rockman
0
 

Author Comment

by:andem
ID: 11913622
OK. I understand that I need to 'test' the 'testing server' to be sure it is setup to allow connection of the database. I don't understand exactly how I am to do that. Please be more specific in the steps I am to take. Assume, as is true, that I am totally ignorant in this arena. I know that I can access the mysql database through a GUI using either 'localhost' or '127.0.0.1' as the server name.  What are the 'couple of ways' you mentioned to test?
Andem

0
 
LVL 10

Accepted Solution

by:
rockmansattic earned 250 total points
ID: 11913752
OK, start by going to the site definition for your site, then click Testing server.
Make sure this information is correct.  click TEST.  One thing to remember, just because this connection is made correctly, doent mean that the MYSQL will.  It has to be exact.  

For instance.  mine (not working locally, but) the ftp host is the base url, then the host directory is two folders deep
88.888.888.88 and /thisfolder/thisotherfolder/  respectivly.
start by puttig localhost in the host and the /folder in the host directory.

then the url prefix is the squirrly part.  It usuall has to be the full url .. locallhost/yourfolder/yourotherfolder/

then click test.  hopefully successfull.

Then click OK, goto the database panel and click + then try to connect to the local host.  

Depending on the way your IIS or equivilant is setup, I have found that the URL Prefix under the site definitions it the main problem.  This is what I have to play around with sometimes, but I rarely use my machine for testing, I am usually live on the server I ftp to.

Hope this helps.

Rockman
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 12006461
any luck?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question