Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Dumb PHP / Database Question...


  • Please log in to reply

#1
stearmandriver

stearmandriver

    Member

  • Member
  • PipPip
  • 67 posts
Hi,

So I've been playing with Dreamweaver and Coldfusion lately, and I'm starting to mess with PHP a bit. I have yet to publish a dynamic site, so I don't really understand - where does the MySQL database go for a PHP site?

With Coldfusion I was just using an MS Access database, and it could live in the same root folder as the rest of the site. I assume to publish that site, I'd just publish the whole root folder like usual, and since it contained the database I'd be good to go.

MySQL, on the other hand, puts the database in the MySQL localhost folder on my machine - separate from the rest of the site. I can still create a connection to it in Dreamweaver, but what happens when I publish this site? The database isn't in the local root website folder.

I can always just upload it separately... but does it go anywhere special on the web server, or just in the root folder? Or can I somehow create a MySQL database that's inside my PHP website local folder from the beginning, so it just gets published with the rest of the site?

I hope that makes sense... thanks.
  • 0

Advertisements


#2
thenotch

thenotch

    Member

  • Retired Staff
  • 667 posts
Your web host SHOULD provide a MySQL database which resides on the server. You configure the server via whatever admin control panel they provide or SSH.
If you have created a database locally, in MySQL you can export that into the one your host provides (obviously changing any paths etc that may need to be).

If your host is a *nix based host you will most likely need to provide the absolute path when creating your actual links to the database content (ie /home/public_html/).
  • 0

#3
stearmandriver

stearmandriver

    Member

  • Topic Starter
  • Member
  • PipPip
  • 67 posts
Hey, thanks for the quick response.

Ok, so this is obviously webhost-specific to a certain extent. I'll sift through their online help and figure out where the database goes.

What I'm doing is building a site on my local machine, then I'll be wanting to upload it all at once. So, if I export the MySql database to wherever it goes on my webhost server, do I need to change any of the database connection settings Dreamweaver built to my site? Right now the site is set up in DW to connect to my local database, so I can build and test. And if I DO change the database connection in DW to point to the database on the webhost server, do I need to re-create all my recordsets etc., or are they not dependent on the specific database connection?

Sorry I've gotta do it the dummies way with Dreamweaver... I'm pretty good with HTML / CSS, but a long ways away from handcoding PHP. ;-)

Thanks a lot...
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP