Created
November 5, 2013 12:57
-
-
Save omarkurt/7318632 to your computer and use it in GitHub Desktop.
server working helper me
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 | |
echo "Command Using : " | |
echo "# Database Create (c) or Database Delete (d)" | |
USER="root" # mysql user | |
PASS="root" # mysql user pw | |
read command | |
if [ "$command" == "c" ]; then | |
echo "Database name ;" | |
read dbname | |
mysql -u $USER -p$PASS -e "create database $dbname" | |
echo "[+] OKEY" | |
elif [ "$command" == "d" ]; then | |
echo "Database name ;" | |
read dbname | |
mysql -u $USER -p$PASS -e "DROP DATABASE $dbname" | |
echo "[+] OKEY"; | |
else | |
echo "unknown commadn!11" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment