Skip to content

Instantly share code, notes, and snippets.

View jinopl's full-sized avatar
✌️
Focusing

JINO jinopl

✌️
Focusing
  • Kerala india
View GitHub Profile
#!/bin/bash
# MySQL Backup Installation Script
# Downloads and configures mysqlbackup.sh with AWS credentials and cron job
# Usage: ./install-mysqlbackup.sh
set -euo pipefail
# Color codes for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
#!/bin/bash
# Usage: mysqlbackup.sh <domain> <dbname>
#cron example: 0 0,5,10,15,20 * * * /path/to/mysqlbackup.sh example.com mydatabase >> /path/to/cron.log 2>&1
set -euo pipefail
# Validate arguments
if [[ $# -lt 2 ]]; then
echo "Error: Missing required arguments" >&2
echo "Usage: $0 <domain> <dbname>" >&2
@jinopl
jinopl / hostname.html
Last active June 24, 2023 06:36
hostname index html
<html>
<body>
<style>
h1 {color: red;}
</style>
<h1> Test page from AWS pipeline </h1>
</body>
</html>
1.Stop mysql
============
systemctl stop mysqld
2.Set the mySQL environment option
===============================
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
3.Start mysql usig the options you just set
===========================================