Browse Source

Hopefully the last fixes

master
Apostolos Fanakis 6 years ago
parent
commit
27b0b4c1af
  1. 20
      UI/Database API/SETUP.md
  2. 2
      UI/Database API/hyrieus/flavoursAPI/settings.py
  3. BIN
      UI/release.apk

20
UI/Database API/SETUP.md

@ -31,15 +31,6 @@ and run the following sql command:
UNINSTALL PLUGIN validate_password;
```
For the Android app to be able to reach the API, you need to provide a route either through your public IP or though your router using your LAN IP. In either case you need to tell the MySQL server *where to listen* by modifying the file `/etc/mysql/mysql.conf.d/mysqld.cnf`. Use a preferred editor to change the line starting with `bind-address` to `bind-address = YOUR_IP`.
**WARNING:** You may not be able to connect to the MySQL server again, until you revert this change!
When done, run the command bellow to restart MySQL server:
```bash
sudo systemctl restart mysql.service
```
You are now ready to setup the database and API application using the command bellow and following the instructions:
```bash
./install.sh
@ -70,9 +61,7 @@ rm -rf hyrieus/flavoursAPI/hyrieus/migrations
git checkout -- hyrieus/flavoursAPI/settings.py
```
3. Revert changes to the file `/etc/mysql/mysql.conf.d/mysqld.cnf`. Use an editor to change the line starting with `bind-address` to `bind-address = 127.0.0.1`.
4. Reinstall MySQL's password validation plugin. Login to the mysql server as root:
3. Reinstall MySQL's password validation plugin. Login to the mysql server as root:
```bash
mysql -h localhost -u root -p
```
@ -81,10 +70,7 @@ mysql -h localhost -u root -p
INSTALL PLUGIN validate_password SONAME 'validate_password.so';
```
5. Connect to MySQL server and drop the flavoursWithoutBorders schema:
4. Connect to MySQL server and drop the flavoursWithoutBorders schema:
```bash
mysql -h localhost -u root -p -e "DROP DATABASE IF EXISTS flavoursWithoutBorders;"
```
---
<sub>Hyrieus was a Greek mythical figure known for his son, Orion. Gods gave Orion to Hyrieus because he was super lonely, like me when working on this assignment. 😔</sub>
```

2
UI/Database API/hyrieus/flavoursAPI/settings.py

@ -89,7 +89,7 @@ DATABASES = {
'NAME': 'flavoursWithoutBorders',
'USER': 'flavoursUser',
'PASSWORD': 'database_password_goes_here',
'HOST': 'server_ip_goes_here',
'HOST': '127.0.0.1',
'PORT': '',
},
}

BIN
UI/release.apk

Binary file not shown.
Loading…
Cancel
Save