diff --git a/UI/Database API/SETUP.md b/UI/Database API/SETUP.md index 98968c5..5e27a34 100644 --- a/UI/Database API/SETUP.md +++ b/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;" -``` - ---- -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. 😔 \ No newline at end of file +``` \ No newline at end of file diff --git a/UI/Database API/hyrieus/flavoursAPI/settings.py b/UI/Database API/hyrieus/flavoursAPI/settings.py index ea49822..d10e270 100644 --- a/UI/Database API/hyrieus/flavoursAPI/settings.py +++ b/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': '', }, } diff --git a/UI/release.apk b/UI/release.apk index 2cee9c9..6e19e85 100644 Binary files a/UI/release.apk and b/UI/release.apk differ