Posts: 337
Thanks: 49
Thanked 33 Times in 27 Posts
If databases were saved in a specific path per each user, could be possible to check for size of every file in each user folder.
Maybe a cron could check with a db_quota table, and, if size >= db_quota, remove INSERT / UPDATE permissions for users. If size < db_quota, then grant permissions back.
Could this approach work? is not the best but, I think that this could help a lot.
Posts: 31,892
Thanks: 693
Thanked 4,188 Times in 3,205 Posts
Mysql stores all databases in it main database path and if innodb is used, even all databases are in the same file. So the only way to get the size is to query mysql for the table sizes and then build some kind of quota function around that.
Recent comments
53 min 19 sec ago
10 hours 21 min ago
11 hours 10 min ago
14 hours 43 min ago
19 hours 7 min ago
19 hours 29 min ago
21 hours 39 min ago
1 day 7 hours ago
1 day 12 hours ago
1 day 14 hours ago