53GB

How To Use MySQL Database With Flask – Flask Fridays #9



In this video I’ll show you how to use the MYSQL database with Flask and SQLAlchemy.

In the last video we set up SQLite as the database using SQLAlchemy, in this video I’ll show you how to convert that to MYSQL. It’s really really easy! None of our actual code will change, we just need to point to a MYSQL database and set it up.

Timecodes
0:00​​ – Introduction
1:27 – Download and Install MySQL
3:44 – Set the DATABASE_URI for MySQL
6:36 – Pip Install MySQL Connectors
7:43 – Create The User Database
12:08 – Try Import Import Database From Python Shell
13:11 – Pip Install PyMySQL and cryptography
13:42 – Update MySQL DATABASE_URI For PyMySQL
14:05 – Import and Create Database From Python Shell
14:28 – Test Out the App
16:58 – Conclusion

#codemy #flask #johnelder

Exit mobile version