Skip to content

Instantly share code, notes, and snippets.

@joskar201
Created June 18, 2017 18:08
Show Gist options
  • Save joskar201/580dd324cc45705917d3c77ec26503c5 to your computer and use it in GitHub Desktop.
Save joskar201/580dd324cc45705917d3c77ec26503c5 to your computer and use it in GitHub Desktop.
Connecting to a mysql database using bash.
mysql -u USER -pPASSWORD <<EOF #replace USER with your username and PASSWORD with your password
SQL_QUERY 1 #Write a real sql querry
SQL_QUERY 2 #Write a real sql querry
SQL_QUERY N #Write a real sql querry
EOF #terminate session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment