/etc/gyan/gyan.conf
In the [database] section, configure database access:
[database]
[database] ... connection = mysql+pymysql://gyan:GYAN_DBPASS@controller/gyan