In this section, you will learn about a creating new database in MySQL. We are going to use this database throughout this chapter. Create the script mysql_02.sh to create the database:
#!/bin/bash mysql -u root -pTraining2@^ <<MY_QUERY create database testdb; MY_QUERY
Now save the program and run it as follows:
$ chmod +x mysql_02.sh $ ./mysql_02.sh