2021-10-19
2762
#python
Ekekenta Odionyenfe
72711
Oct 19, 2021 ⋅ 9 min read

Server-side rendering with FastAPI and MySQL

Ekekenta Odionyenfe I am a software engineer and technical writer who is proficient in server-side scripting and database setup.

Recent posts:

Building a Full-Featured Laravel Admin Dashboard with Filament

Building a full-featured Laravel admin dashboard with Filament

Build scalable admin dashboards with Filament and Laravel using Form Builder, Notifications, and Actions for clean, interactive panels.

Kayode Adeniyi
Dec 20, 2024 ⋅ 5 min read
Working With URLs In JavaScript

Working with URLs in JavaScript

Break down the parts of a URL and explore APIs for working with them in JavaScript, parsing them, building query strings, checking their validity, etc.

Joe Attardi
Dec 19, 2024 ⋅ 6 min read
Lazy Loading Vs. Eager Loading

Lazy loading vs. Eager loading

In this guide, explore lazy loading and error loading as two techniques for fetching data in React apps.

Njong Emy
Dec 18, 2024 ⋅ 5 min read
Deno logo over an orange background

How to migrate your Node.js app to Deno 2.0

Deno is a popular JavaScript runtime, and it recently launched version 2.0 with several new features, bug fixes, and improvements […]

Yashodhan Joshi
Dec 17, 2024 ⋅ 7 min read
View all posts

3 Replies to "Server-side rendering with FastAPI and MySQL"

  1. Hi, thanks a tone for your super detailed tutorial!

    Unfortunately, When I start the uvicorn server, I cannot connect to mysql because of an error as following

    > sqlalchemy.exc.ProgrammingError: (mysql.connector.errors.ProgrammingError) 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)

    Seems like I need to give my password in order to connect to mysql successfully.
    Can you help fixing this? Thanks a lot!

    1. It’s because you should use the password of your MySQL Sserver in the command : “root:password@localhost:3306/serversiderendering”

  2. I guess the pydantic class attribute are typed annotated not assigned. id: int not id = int. I might be wrong tho, im not a fast api guy.

Leave a Reply