Authors: Aubrey Kopkau and Chloe Robinson
Tutor scheduling website created using a SQL database
This guide walks you through setting up the database and running the application locally.
- Download and install MySQL Community Edition
- During installation, set your root password
- Open MySQL 8.0 Command Line Client
- Enter your password
- Run the following commands:
CREATE DATABASE tutor_sphere;
USE tutor_sphere;-
Open Command Prompt (CMD on Windows)
-
Run:
mysql -u <username> -p tutor_sphere < /path/to/tablesMySQL.sqlAdd MySQL to PATH. For example:
C:\Program Files\MySQL\MySQL Server 8.0\bin
Inside the MySQL command line:
USE tutor_sphere;
SHOW TABLES;
DESCRIBE USERS;
DESCRIBE SUBJECTS;-
In the project root directory, create a
.envfile -
Add the following line (replace with your MySQL password):
DATABASE_URL=mysql://root:password@localhost/tutor_sphere
Format:
mysql://username:password@localhost/database
- Navigate to:
\backend\schemas\relation
-
Open CMD in that directory
-
Run:
python import.py-
Go back to the project root directory
-
Run:
python app.py- Ensure MySQL is running before starting the app
- Double-check your
.envcredentials if connection fails - Use
SHOW TABLES;to confirm successful setup
Resources used to help navigate and connect database to app
[1]Coding With Moiz Khan, “How to Connect MySQL Database with Flask | Step-by-Step Guide for Beginners,” YouTube, Aug. 17, 2024. https://www.youtube.com/watch?v=kCNfWwHyTmY (accessed Apr. 03, 2026).
[2]“MySQL :: MySQL 8.4 Reference Manual :: 15.1.12 CREATE DATABASE Statement,” Mysql.com, 2025. https://dev.mysql.com/doc/refman/8.4/en/create-database.html
[3]GeeksforGeeks, “Templating With Jinja2 in Flask,” GeeksforGeeks, Dec. 28, 2022. https://www.geeksforgeeks.org/python/templating-with-jinja2-in-flask/
[4]W3Schools. (n.d.). Python Dates. Www.w3schools.com. https://www.w3schools.com/python/python_datetime.asp
[5]W3Schools. (n.d.). MySQL DATE_ADD() Function. Www.w3schools.com. https://www.w3schools.com/sql/func_mysql_date_add.asp
[6]AB, D. S. (2024, October 17). DbVisualizer. DbVisualizer; DbVis Software AB. https://www.dbvis.com/thetable/a-complete-guide-to-the-mysql-boolean-type/