Unanswered: php access to mySQL db in different folder?
newbie question ...
i'm running a php interpreter and mySQL for windows on my local machine (xp pro pc). php files located inside my Inetpub/wwwroot folder run fine, so i assume the interpreter has been folded into IIS somehow. with the mySQL server running, i can connect to localhost.
problem is, i created a test database from the mySQL command prompt, so it lives (by default) in the mysql/data folder. i'd like to access the mySQL database via my php scripts, regardless of where those two files reside.
i tried to google my way through this, but nothing so far. if you've got any hints, i'd be into hearing.
You basically need to create the database as a server object within you PHP scripts so you can draw information from it. This is a really common need so I am suprised you couldn't find what you need on google. I use ASP so I don't know the command sequences off the top of my head. http://hotscripts.com has alot of PHP database tools that will work with MySQL. Take a look through those and see if you can find what you need.
yeah, in ASP you'd just define the path as part of the connection string:
i guess i was looking for an analog in the PHP world. there're plenty of tutorials that talk about how to install the php and mySQL clients, and how to use php to connect to the mySQL server (and thence to the database). just nothing that talks about getting the php client to see databases that live in other folders.