You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
412 B

#!/bin/bash -x
sudo apt-get install postgresql mysql-server -y
sudo -u postgres psql <<EOF
CREATE USER "PROJECTNAME" password 'PROJECTNAME';
CREATE DATABASE "PROJECTNAME_test" OWNER "PROJECTNAME";
EOF
sudo mysql -u root -p <<EOF
CREATE DATABASE PROJECTNAME_test;
GRANT USAGE ON *.* TO PROJECTNAME@localhost IDENTIFIED BY 'PROJECTNAME';
GRANT ALL PRIVILEGES ON PROJECTNAME_test.* TO PROJECTNAME@localhost;
EOF