Creating a database

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 to create the database:

mysql -u root -pTraining2@^ <<MY_QUERY 
create database testdb; 

Now save the program and run it as follows:

 $ chmod +x $ ./

Get Learning Linux Shell Scripting - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.