Created
January 28, 2022 16:47
-
-
Save pietrorea/9081e2810c20337c6ea85350a31bb427 to your computer and use it in GitHub Desktop.
MySQL here document example
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
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