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:

Nitro: Revolutionizing Server-Side JavaScript

Nitro.js: Revolutionizing server-side JavaScript

Nitro.js is a solution in the server-side JavaScript landscape that offers features like universal deployment, auto-imports, and file-based routing.

Iniubong Obonguko
Sep 16, 2024 ⋅ 11 min read

How to display notification badges on PWAs using the Badging API

Ding! You got a notification, but does it cause a little bump of dopamine or a slow drag of cortisol? […]

Chigozie Oduah
Sep 13, 2024 ⋅ 4 min read
JWT Authentication: Best Practices And When To Use It

JWT authentication: Best practices and when to use it

A guide for using JWT authentication to prevent basic security issues while understanding the shortcomings of JWTs.

Flavio Copes
Sep 12, 2024 ⋅ 5 min read

Auth.js adoption guide: Overview, examples, and alternatives

Auth.js makes adding authentication to web apps easier and more secure. Let’s discuss why you should use it in your projects.

Clara Ekekenta
Sep 12, 2024 ⋅ 10 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