troff
06-20-2002, 07:53 PM
Hello. Great forum guys!
Anyone has any tips/stories on how do they handle mySQL databases for their customers?
E.g. How do you limit each customer (virtual website) to let's say one database. Does the size of their database go towards their disk quota?
I know how to install mySQL and PHPmyadmin but haven't done so yet.
Lastly I know that no matter what the solution is, all customer databses are visible via the phpMyadmin interface to other customers (name only, you can't access them without the password).
Thanks in advance!
elsmore1
06-20-2002, 10:50 PM
Originally posted by troff
Hello. Great forum guys!
Does the size of their database go towards their disk quota?
I would imagine that varies from host to host, but it would seem to make the most sense to include databases when calculating disk space usage, especially when not using a dedicated mysql server. (it's a little easier to do when the databases are on the same machine as the web sites, although not much easier.
Lastly I know that no matter what the solution is, all customer databses are visible via the phpMyadmin interface to other customers (name only, you can't access them without the password).
Not true. phpmyadmin can be configured to only show databases that the user has permissions for.
Thanks in advance!
troff
06-20-2002, 11:51 PM
Hmmm nice info but how would you do it in reality?
E.g. Customer calls you up says he wants to have mySQL enabled on his virtual website. You do so but would like to limit him to only 2 databases for his website.
How would you go about doing this on a Raq4?
Another scenario is that you would also like to limit the size of the database (e.g. if he has 50mb allocated to him).
Thanks
The Thinker
06-21-2002, 12:19 AM
The company that help set up all of our servers did this exact thing for us. phpMyAdmin only has access to the databases that the username password matchs. Other users cannot see other databases.
His nick on here is cbtrussell......contact him for detailed information.....their rates are great for custom Cobalt installations....
monkey_boy
06-27-2002, 12:41 PM
Michael Stauber has contributed a package to help setup phpMyAdmin for virtual sites - I haven't tried it, though. Just came across it this morning.
http://www.solarspeed.net/index.php?topic=downloads&menu=0:)
blacknight
06-27-2002, 03:01 PM
I haven't tried Solarspeeds version, but the Cobalt World one works perfectly.
Only root has privileges to create databases..
Limiting the size??? Hmmm... That would be nice.. any ideas?
troff
06-27-2002, 10:56 PM
Don't get me wrong but are you telling me that currently your implementation of mySQL on your RAQs has no size limit with respect to the virtual websites?
If so, what's to stop a customer from building up a mySQL database that's 100s of megabytes in size?
I'm not sure how to do it either (still messing around after patching that stupid Apache hole) but I think you have to store that customer's mySQL tables/database inside his own directory so that the directory size quotas will limit his database size without you having to worry about it.
I could be wrong, I have installed the Solarspeed phpMyadmin but the size thingie is still bugging me.
Any takers? :confused:
Sainthax
06-27-2002, 11:59 PM
ok to shed some light on this, the MySQL install package puts the database's in /home/mysql This has no relation to the virtual websites so anyone could run up a few hundred MB's of space in their database. I don't think you can get away with putting each site's database in the site directory without some major reconfiguring of MySQL itself.
troff
06-28-2002, 12:17 AM
Damn. I thought there would be a relatively easy way out.
Looks like in the long term I'll be looking at the Raq version of Plesk or Ensim.
Thanks though, but I do hope you're wrong :D
Can anyone else shed light to his answer? If it's really difficult to put each customer's database in his own directory, then isn't this a potential security hole? (i.e. a customer could crash your server by filling up the MySQL database until your harddisk bursts).
D8Mike
06-28-2002, 04:49 AM
We allow 25 mb per mysql database. This is monitored by logging into phpmyadmin as root and it lists all mysql databases and their sizes. If a database exceeds 25 mb we bill them 5 dollars a year for each additional 25 mb.
And to answer your question whats to stop a user from building a few hundred mb database?
The Suspend Button.