Software Engineering Project
$ sudo g++ src/ALPE.cpp -o ALPE -Wall -I/usr/include/cppconn -L/usr/lib -lmysqlcppconn -std=c++11
$ ./ALPE
This software reqires the following pre-installed softwares and well as environment setup.
- GNU g++ comiler -version 5.0 and above.
- GNU gcc compiler -version 5.0 and above.
- MySQL server -distribution 5.6 and above.
- MySQL Connector/C++ version 5.6 and above
$ sudo apt-get install libmysqlcppconn-dev
-
The MySQL server must be preinstalled on the server side.
$ sudo apt-get install mysql-server-5.7
-
The MySQL server must be setup to provide access to username
ALPE
and passwordroot
.$ mysql -h 127.0.0.1 -P 3306 -u root -p
In MySQL:
create user 'ALPE'@'localhost' identified by 'root'; grant all privileges on *.* to 'ALPE'@'localhost' with grant option; create user 'ALPE'@'%' identified by 'root'; grant all privileges on *.* to 'ALPE'@'%' with grant option; flush privileges; exit;
$ sudo service mysql restart
-
The MySQL server must be set-up to contain the following databases,
$ mysql -h 127.0.0.1 -P 3306 -u root -p
- LOGIN
create database LOGIN;
- TEACHER
create database TEACHER;
- STUDENT
create database STUDENT;
-
The "LOGIN" database must have the following tables with their Descriptions to match that shown on the image,
$ use LOGIN;
- ADMIN
create table ADMIN( ID int not null auto_increment, username longtext, password longtext, primary key(ID) );
- TEACHER
create table TEACHER( ID int not null auto_increment, username longtext, password longtext, primary key(ID) );
- STUDENT
create table STUDENT( ID int not null auto_increment, username longtext, password longtext, primary key(ID) );