I try to write a script, which create database and tables in it.
For example, my bash file create attempt:
#!/bin/bash
mysql -u root -p
use dbname;
create......
.......
exit;
Is executed joining into mysql console and that all. Script not create any table in database and not executed exit from mysql console.
How to correct create the script for that task?