0
I am trying to make a routine to deploy an application, and I came across a problem in shell script, the mysql commands I can’t run inside it, but at the prompt work, which 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