Please, please absorb this fundamental Truth:
Database != File
You cannot interact directly with a MySQL database
as a file.
You interact with (connect to) a Process, running on a server somewhere. That process deals with [all] the files.
Exposing any database directly to The Web is generally a Bad Idea.
They are
lots of nasty things out there, just waiting to find and attack your database and, quite simply, databases do not have the tools necessary to defend themselves. A
Web Server does. They're built with all these "challenges" in mind.
A typical application structure these days would be:
- A client application (often in a web browser).
- The client talks to a Web Application, be it one that returns HTML to be rendered directly in the browser or a set of Services called by the client.
- The Web Application talks to the database(s).
Regards, Phill W.