I'm trying to do a routine to deploy an application, and I came across a problem in the shell script, the mysql-related commands I can not execute inside the same, but at the prompt they work, what should be done? >
mysql -u sdesk_autoinstall -pSENHA;
CREATE DATABASE $1;
echo "Database $1 created"
CREATE USER '$1'@'localhost' IDENTIFIED BY '$2';
GRANT ALL PRIVILEGES ON $1 . * TO '$1'@'localhost';
echo "User permission inserted"
use $1;
source /var/www/app.dominio.com/install/db/db_demo.sql;
mkdir /var/www/app.dominio.com.br/html/$1