Skip to content

11-Sarthak/DevOps-MySQL-Rotation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MySQL Database Password Rotation Script This is a DevOps & Security Automation project that automates password rotation for MySQL using Python and subprocess. This is a Database Password Rotation Script in Python.

πŸ“Œ Project Overview What it does: βœ… Generates a random new password βœ… Connects to MYsql via subprocess βœ… Runs a Mtsql query to update the password βœ… Stores the new password securely (optional: AWS Secrets Manager, Vault, or a local file)

This is actually a real-world DevOps use case! 🎯

Why?

Automating Password Rotation πŸ”„

Many security policies require regular password rotation for databases. Your script automates the process, reducing manual work. Securely Storing Credentials πŸ”

Instead of manually remembering passwords, they are stored in a secure file. Can be extended to use environment variables or secret vaults like AWS Secrets Manager or HashiCorp Vault. Using Scripting for Admin Tasks βš™οΈ

DevOps engineers automate database admin tasks to improve efficiency. This script could be integrated into CI/CD pipelines for database access management.

Required Libraries:

subprocess β†’ To execute Mysql queries string, secrets β†’ To generate random passwords

πŸ“‚ How to Use 1️⃣ Clone the repository:

git clone https://github.com/11-Sarthak/mysqlDatabase-password-rotation.git cd mysqlDatabase-password-rotation

2️⃣ Run the script: python password_rotation.py

3️⃣ Enter MySQL credentials when prompted

Author Sarthak

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages