#!/bin/sh
mysql -u root -h localhost -pYourPassword <<QUERY_SQL
CREATE DATABASE DBname
USE DBname
CREATE TABLE TBname (name char(20), age int)
INSERT INTO TBname VALUES ('Rardge', 25),('AAA', 30)
SELECT * FROM TBname
QUIT
QUERY_SQL
mysql -u root -h localhost -pYourPassword <<QUERY_SQL
CREATE DATABASE DBname
USE DBname
CREATE TABLE TBname (name char(20), age int)
INSERT INTO TBname VALUES ('Rardge', 25),('AAA', 30)
SELECT * FROM TBname
QUIT
QUERY_SQL