navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

connecting to MySQL

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Dreamweaver Help >> connecting to MySQL
Page: [1]
 
lozfromaus

 

Posts: 3
Joined: 4/19/2007
Status: offline

 
connecting to MySQL - 4/19/2007 10:21:13   
Hi, I'm new to the forum and to MySQL (and building websites). I'm working in dreamweaver 8 on mac osx. My ISP has set up MySql/PHPadmin for me in my cpanel. I've set up a testing server on my website.
Server Model: PHP MySQL
Access: Local/Network
Testing Server Folder: Showing the location of the folder I set up which holds serverscripts folder, mysql.php and php document files.
URL Prefix is showing as http:/MacintoshHD/_mmServerScripts/MMHTTPDB.php

The checklist in the 'databases' are all ticked.

Click + in Databases, select MySQL connection. Dialogue box appears.
Connection Name: - What should go in here, I have tried php document name, connection folder name and everything else under the sun. My ISP sent me the details for server/user/password and d/base, so I know they are correct. I click 'test' and receive this generated message.

HTTP Error Code 404 File Not found. Here are some possible reasons 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://MacintoshHD/_mmServerScripts/MMHTTPDB.php?
Type=MYSQL&ConnectionString=host=remotemysqlhost;uid=glasall0_midph;pwd=******;&Host=remotemysqlhost&&Database=&UserName=glasall0_midph&Password=******&Timeout=30 URL. Verify that the URL Prefix maps to the root of the site.

I take it as my ISP supports php/mysql I don't require any other applications, or to set up a remote folder?

I have googled and googled, read and read, but cannot find an answer. I need help, 3 days I've been staring at dreamweaver! Please use beginner terms, I'm very green but very determined!

Thank you.
womble

 

Posts: 5528
Joined: 3/14/2005
From: Living on the edge
Status: offline

 
RE: connecting to MySQL - 4/19/2007 10:52:04   
I take it your script or app's written in PHP?

Usually the connection part of the script's something like:

$connection = mysql_connect("localhost","dbname","pw");
if (!$connection)
  {
  die('Could not connect: ' . mysql_error());
  }


where "dbname" and "pw" are replaced with the name of your database and password. Usually 9 times out of 10 "localhost" is the right server connection, but it can vary depending on how the server's set up.

Are you trying to connect to a db on your local machine with a local server installed, or on a live server on the web. The connection details will vary depending on where you're connecting to. I've not used dreamweaver, so I'm not sure how a connection's established with it, but presumably if you're trying to connect through Dreamweaver, you'll need to specify the location of the server as well. When your ISP gave you the connection details, did they know you were connecting through Dreamweaver?

_____________________________

~~ "A cruel god ain't no god at all" ~~
:)

(in reply to lozfromaus)
lozfromaus

 

Posts: 3
Joined: 4/19/2007
Status: offline

 
RE: connecting to MySQL - 4/19/2007 11:19:52   
Hi Womble,
Haven't actually written the document as yet, in Dreamweaver I just had to create the document first to enable the connection. Dreamweaver is in testing server mode. I have contacted my ISP to let them know that, I don't know if it would make any difference.

I'm sure there must be many people out there that have connected through Dreamweaver???

Thanks,
Lorraine

(in reply to womble)
womble

 

Posts: 5528
Joined: 3/14/2005
From: Living on the edge
Status: offline

 
RE: connecting to MySQL - 4/19/2007 11:32:04   
This any use at all? I did notice part way down that it says that if PHP and MySQL are on the same machine, to use "localhost"

quote:

Note: For the MySQL Server field you must enter localhost if PHP and MySQL are running on the same machine.


You can probably safely ignore the first part of the article which talks about configuring MySQL because that's only relevant if you've got command line access to your MySQL server.

_____________________________

~~ "A cruel god ain't no god at all" ~~
:)

(in reply to lozfromaus)
lozfromaus

 

Posts: 3
Joined: 4/19/2007
Status: offline

 
RE: connecting to MySQL - 4/19/2007 11:43:16   
I have tried "localhost" too. I'll have a look at that link after I have a sleep, it's 1 o'clock Friday morning here in Aussieland and I'm feeling quite braindead. Hopefully there be heaps of advice when I wake up! Thanks for your help Womble!

Lorraine

(in reply to womble)
jesse1

 

Posts: 21
Joined: 3/29/2007
Status: offline

 
RE: connecting to MySQL - 5/9/2007 13:59:39   
this is the hardest part (at least for me) of working with php/sql in DW.

you have to try some different formatting of the testing server url.

once you get it right though and login, you should see your table name and the information about your database fields.

stick with it.

Some ISP's though (I think Godaddy) don't allow remote connections to SQL database.

(in reply to lozfromaus)
Page:   [1]

All Forums >> Web Development >> Dreamweaver Help >> connecting to MySQL
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts