#!/bin/bash

service mysql start && \
  mysql < <( echo -e 'create database busdb;\ncreate user bus;\ngrant all privileges on busdb.* to "bus"@"%";\nflush privileges;\n' ) && \
  su bus -c " cd /home/bus && \
    mysql -u bus busdb < /home/bus/popufare/server/sql_schema/create_tables.sql && \
    mysql -u bus busdb < popufare/server/testing/db/setup-testdb.sql "

