Move references to support folder

docker
root 2018-06-06 17:56:24 +02:00
parent a4038005e8
commit a5e94847b3
3 changed files with 24 additions and 0 deletions

24
support/install_db.sh Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
checkconn=`pgrep -f mysql`
if [ -z "$checkconn" ]; then
echo "enabling mysql server :"
mysql.server start
fi
echo 'What is the database name ?'
read dbname
echo 'What is your database username ? (do not worry, we will not ask about your password)'
read dbuser
echo "MySQL is going to ask you for a password, not us. The purpose is for you not to have your password in your history \n"
echo 'creating database...'
mysql -u"$dbuser" -p -e "CREATE DATABASE \`$dbname\`;"
echo 'importing data for database.'
mysql -u"$dbuser" -p $dbname < database.sql
echo 'Database is now ready ! Enjoy'