Forum Moderators: mack

Message Too Old, No Replies

where to place ur database?

         

apollo23

8:59 am on Apr 4, 2005 (gmt 0)

10+ Year Member



Hi Guys

Am new to web design and been reading up on mysql with php so tht i can get my hands wet with dynamic web pages.

So far hv yet to read where the data file shud be placed.

If i were to keep my files in /mysite, and like to place the data file in /mysite/data, how shud the connection be in php?

Basically hope to create a site for user to place coments and info. Hope to make the site into a library.

Thanks.

Stephen

mack

12:29 pm on Apr 4, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Are you talking about using mysql or plain text files as your database?

Mack.

MamaDawg

12:49 pm on Apr 4, 2005 (gmt 0)

10+ Year Member



apollo23, you would normally create the database someplace outside of your document root.

When making a connection, you specify the host (localhost, assuming your web application is on the same machine as the database), database name, and login information (user id and password). The MySQL server process running on the machine is able to map this to the physical location of your database files and make the connection.

Hope this helps ...

txbakers

2:05 pm on Apr 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



be sure to put the database somehwere that it is NOT accessible over the internet. That would be a major securiy breach