May 2017
Beginner
552 pages
28h 47m
English
The first script, create_db.sh, creates a database called students and a table named students inside it. The mysql command is used for MySQL manipulations. The mysql command specifies the username with -u and the password with -pPASSWORD. The variables USER and PASS are used to store the username and password.
The other command argument for the mysql command is the database name. If a database name is specified as an argument to the mysql command, it will use that database; otherwise, we have to explicitly define the database to be used with the use database_name command.
The mysql command accepts the queries to be executed through standard input (stdin). A convenient way of supplying multiple lines through stdin is using ...