A docker-compose stack to set up a LAMP stack
#Clone this repository or unzip the repository(MedTest_Group22)
git clone https://github.com/kkanho/MedTest_Group22
#change to the correct directory
cd MedTest_Group22
#Build the server through docker
docker-compose up --build
Open http://localhost to view it in the browser.
#if any errors, try to restart multiple times with the following command
docker-compose down
docker-compose up --build
We view query log using phpMyAdmin using the following 2 accounts
Username | Password |
---|---|
root | |
admin | 123123 |
In order to view query log using account admin, type the following command in the docker
#locate the image(mysql:latest), get the container id(8815b887d4d7)
docker ps
#run commands inside an existing container, with the id(8815b887d4d7) just get
docker exec -it 8815b887d4d7 bash
#execute the following command inside the container
mysql -h localhost -P 3306 -u root
GRANT ALL PRIVILEGES ON mysql.general_log TO 'admin';
FLUSH PRIVILEGES;
exit;
#exit the container
exit
To view log, simple run the following query
SELECT * FROM mysql.general_log
- Ability to sign up, login and logout
- Ability to access table with different privileges(front end)
- Form query log