I'm trying create script to manage one mysql database, including new db and user creation.
But I'm not able get it working when I put SQL commands into function. So I create simple script for testing which is still not working :-(
CREATE DATABASE testdb;
CREATE USER 'testdb'@'localhost' identified by 'testdb';
Output is following:
+ MYSQL_CMD='mysql --defaults-file=/admin/mysql/auth.cnf'
./test.sh: line 22: syntax error: unexpected end of file
Have you any idea why it's not working? Thanks for help