I've installed the flask-mysqldb
module with pip package management system on my Windows machine
and I don't know how to run it.
I have tried to add the path to the MySQLdb in System properties and still nothing.
I've installed the flask-mysqldb
module with pip package management system on my Windows machine
and I don't know how to run it.
I have tried to add the path to the MySQLdb in System properties and still nothing.
When I work with Flask and MySQL in Windows, I use XAMPP that includes MariaDB, PHP, and Perl. I run the
XAMPP
server and start MySQL service.I use Flask-MySQL which can be installed using
pip install Flask-MySQL
.Then I create database from
phpMyAdmin
which comes withXAMPP
. In Flask app, I declare the connection and manipulate the database.Here is a demonstration of how to use Flask with MySQL in this Python file:
In this example, I created MySQL table from user input with user mentioned column names.