Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.
/ mysql-quota Public archive

Simple Python script to enforce storage quotas on MySQL databases

Notifications You must be signed in to change notification settings

dylanhansch/mysql-quota

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mysql-quota

This is a simple Python script to enforce storage quotas on MySQL databases. It should be noted though: there are better ways to accomplish storage quotas. For example: file system quotas or running each DB in a separate MySQL instance ran within their own VMs or containers with storage constraints. I created this script as a quick fix - a production system should implement a more proper solution.

Important Note

Currently, we are not storing permissions prior to limits being placed. This means if you have any users without insert, create, or update privileges, they will gain those permissions upon the database limits being lifted.

Cron Job Example

Will run script every minute: * * * * * /usr/bin/python3 /home/quota/mysql-quota/src/main.py >> /home/quota/mysql-quota/src/quota.log

About

Simple Python script to enforce storage quotas on MySQL databases

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages