This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright 2013 Percona LLC and/or its affiliates | |
# @see https://www.percona.com/blog/2013/12/24/renaming-database-schema-mysql/ | |
set -e | |
if [ -z "$3" ]; then | |
echo "rename_db <server> <database> <new_database>" | |
exit 1 | |
fi | |
db_exists=`mysql -h $1 -e "show databases like '$3'" -sss` | |
if [ -n "$db_exists" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Installation steps (untested, sorry no CentOS machine) | |
install file at /etc/init.d/marmalade | |
change PATH TO NODE BINARY | |
change PATH TO MARMALADE | |
change user if desired | |
#add script to rc.d | |
sudo chkconfig --add marmalade |