edwardUL99 / StudSysCppLibrary

The library for a Student Management System coded in C++. This is a "dummy" project that is not used but done to practise C++ and also software engineering in terms of issues, issue tracking, issue refinement, requirements engineering, releases and also databases
GNU General Public License v3.0
1 stars 0 forks source link

Create a database setup script #4

Open edwardUL99 opened 4 years ago

edwardUL99 commented 4 years ago

This script should enable a database user with privileges to create a database and database users to quickly setup the database by also importing all the required sql files.

This should:

edwardUL99 commented 4 years ago

See https://stackoverflow.com/questions/47645383/create-table-works-in-mysql-but-not-in-bash

edwardUL99 commented 4 years ago

And https://stackoverflow.com/questions/7364709/check-if-mysql-database-exists-perform-action-based-on-result

edwardUL99 commented 4 years ago

Example command mysql "student_sys" -u studsys -p -e exit -h pi > /dev/null 2>&1 && echo "Database exists"