I want to connect Mysql to Flask.
Before adding this configuration part:
app = Flask(__name__)
mysql = MySQL()
app.config['MYSQL_DATABASE_USER'] = 'username'
app.config['MYSQL_DATABASE_PASSWORD'] = 'password'
app.config['MYSQL_DATABASE_DB'] = 'dbname'
app.config['MYSQL_DATABASE_HOST'] = 'localhost'
mysql.init_app(app)
I tried to import from flaskext.mysql import MySQL
but after that, I face with this error:
from flaskext.mysql import MySQL
ImportError: No module named 'flaskext'
Then I tried pip install flaskext.mysql
but got this error:
Could not find a version that satisfies the requirement flaskext.mysql (from versions: ) No matching distribution found for flaskext.mysql
So what should I do then?