Skip to content

Instantly share code, notes, and snippets.

View BristolTechnology's full-sized avatar

BristolTechnology

View GitHub Profile
@BristolTechnology
BristolTechnology / rename_db
Last active May 11, 2018 10:56 — forked from simonrjones/rename_db
Shell script to rename a database, based on https://www.percona.com/blog/2013/12/24/renaming-database-schema-mysql/ and forked from enhancements made by Simon R Jones. It is revised to accept login parameters for the mysql command
#!/bin/bash
# Copyright 2013 Percona LLC and/or its affiliates
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in