Skip to content

Instantly share code, notes, and snippets.

@omarkurt
Created November 5, 2013 12:57
Show Gist options
  • Save omarkurt/7318632 to your computer and use it in GitHub Desktop.
Save omarkurt/7318632 to your computer and use it in GitHub Desktop.
server working helper me
#!/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