Skip to content

Instantly share code, notes, and snippets.

@pietrorea
Created January 28, 2022 16:47
Embed
What would you like to do?
MySQL here document example
mysql -u root --password="${PASSWORD}" <<EOF
CREATE DATABASE ${DB_NAME};
CREATE USER '${APP_USER}'@'localhost' IDENTIFIED BY '${APP_PASSWORD}';
GRANT ALL ON ${DB_NAME}.* TO '${APP_USER}'@'localhost'
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment