The below script will Monitor the MySQL Database postman
(change it to required Database) for tables which are about to run out of auto_increment ids and notify it in Slack.
Below are the libraries used in the notebook.
MySQLdb, requests
- Install the required Libraries.
pip3 install MySQLdb
pip3 install requests
-
Change the url to Slack Web Apps Url.
-
Change user credentials and Database name of MySQL Server.
-
Run the command:
jupyter notebook
and then select the fileMySQL Auto Increment Checker.ipynb
from the browser.