Skip to content

Instantly share code, notes, and snippets.

@russmckendrick
Created October 27, 2014 15:14
Show Gist options
  • Save russmckendrick/4d68848dfea50fea9aa4 to your computer and use it in GitHub Desktop.
Save russmckendrick/4d68848dfea50fea9aa4 to your computer and use it in GitHub Desktop.
connect
EXPECTED_ARGS=2
E_BADARGS=5
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: $0 mysql_port mysql_user"
exit $E_BADARGS
fi
MYSQL_PORT=$1
MYSQL_USER=$2
mysql --host=127.0.0.1 --port=$MYSQL_PORT -u$MYSQL_USER -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment