database to use. Default: no default databa.

Flask-MySQLdb provides MySQL connection for Flask.

Flask-MySQLdb depends, and will install for you, recent versions of Flask (0.12.4 or later) and mysqlclient. Flask-MySQLdb is compatible with and tested on Python 2.7, 3.5, 3.6 and 3.7.

Next, add aMySQLinstance to your code:

MySQLunderstands the following configuration directives:

name of host to connect to. Default: use the local host via a UNIX socket (where applicable)

user to authenticate as. Default: current effective user.

password to authenticate with. Default: no password. read more