Skip to content

liteshz1778/demo_python_flask_app

Repository files navigation

demo_python_flask_app

This repo contains files related to python-demo-flask-app

docker image registry

https://hub.docker.com/repository/docker/liteshz/python-demo-flask-app/tags

Output Screen

image
image

Configure mysqld on localhost

sudo apt install -y mysql-server
sudo systemctl start mysql
sudo systemctl enable mysql


sudo mysql

CREATE DATABASE cloud;

CREATE USER 'flaskuser'@'localhost' IDENTIFIED BY 'flaskpass';

GRANT ALL PRIVILEGES ON cloud.* TO 'flaskuser'@'localhost';

FLUSH PRIVILEGES;


Change this in your app:

conn = pymysql.connect( host="localhost", user="flaskuser", password="flaskpass", db="cloud", port=3306 )


sudo mysql

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; FLUSH PRIVILEGES;


export DB_HOST=localhost export DB_USER=flaskuser export DB_PASSWORD=flaskpass export DB_NAME=cloud


mysql -u flaskuser -p cloud < init.sql


python app.py

Running on http://0.0.0.0:5000


Releases

No releases published

Packages

 
 
 

Contributors