Re: where does database go at host

From: Date: Wed, 24 Jan 2001 08:48:19 +0000
Subject: Re: where does database go at host
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-36357@lists.php.net to get a copy of this message
> I'm going to created a database with the use of a php/html page on my > commercial host (forsite.net). I have yet to master the unix directory > system so I don't want to play around looking for it. Does a database have > to "live" in the MySQL directory, or can it be in my html web directory? > How does it usually get set up? If it can be stored in my web directory, > how do I get it there? You can configure MySQL to store its data directory virtually anywhere you like. I can see how it would seem kind of attractive to sort of have everything in once central location, but it would probably be a particularly Bad Idea (tm) to put it in your web directory: The internals of your MySQL database are then visible to the public just by them surfing to them. Odds are really, really good some hacker can then more easily run a dictionary attack against any passwords stored in your database, including MySQL's "root" access, which if they break that, they can probably use MySQL to over-write the login daemon on the whole machine and then snag "root" access to the OS, and then it's all over. I've never heard of this happening, mind you, but I've never heard of anybody putting their MySQL data directory inside their web directory. It usually gets set up so that there's a "data" directory under your mysql directory, I think. You're probably best off to leave it there unless you have some over-riding concern about the file sizes growing inordinately large and have another drive/partition where they need to go.

« previous php.general (#36357) next »