Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 443
  • Last Modified:

Problem establishing database connection

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
andem
Asked:
andem
  • 3
1 Solution
 
rockmansatticCommented:
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
 
andemAuthor Commented:
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
 
rockmansatticCommented:
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
 
rockmansatticCommented:
any luck?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now