To see all of the databases, we are going to use the command show databases. Create the script mysql_03.sh to see all of the databases:
#!/bin/bash mysql -u root -pTraining2@^ <<MY_QUERY show databases; MY_QUERY
Save the script and run it as follows:
$ chmod +x mysql_03.sh $ ./mysql_03.sh
The output will be:
Database information_schema mysql performance_schema sys testdb