migrate to git.charlotte.sh
This commit is contained in:
commit
fbd588721e
412 changed files with 13750 additions and 0 deletions
41
db-security-sec300/week2.md
Normal file
41
db-security-sec300/week2.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Week2
|
||||
|
||||
## DB Webserver Connection
|
||||
|
||||
* create user for remote access:
|
||||
|
||||

|
||||
|
||||
* allow connections through firewall: `sudo ufw allow from 0.0.0.0 to 0.0.0.0 port 3306 proto tcp`
|
||||
* get python dependencies: `sudo apt update && sudo apt install python3 python3-pip python3-venv`
|
||||
* `cd /home/champuser/proj/`
|
||||
* create virtual environment: `python3 -m venv .venv` activate: `. .venv/bin/activate`
|
||||
|
||||
install flask: `pip install flask`
|
||||
|
||||
Create directory for Flask: `mkdir Flask, cd Flask`
|
||||
|
||||
dependencies `pip install Flask-MySQLdb pip install flask-mysql pip install cryptography`
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
if localhost doesn't work, change bind-address in /etc/mysql/mysql.conf.d/mysqld.cnf
|
||||
|
||||
## Filter from application
|
||||
|
||||
* add form action 
|
||||

|
||||
|
||||
* add python form processing
|
||||
|
||||
 
|
||||
|
||||
## for pets db
|
||||
|
||||

|
Loading…
Add table
Add a link
Reference in a new issue