Today, we’ll connect our Next.js app to MySQL database and develop an authentication feature.

Image for post

1. Setup the MySQL database

At first, I’ll prepare MySQL database to connect.

If you already installed that, you can skip this step. Just create a database and table named ‘users’ in MySQL.

Let’s install the ‘mysql’. I used ‘homebrew’ package manager.

$ brew install mysql

It is not necessary to use this method. Depending on the OS or your preference, you can use different styles.

#nextjs #react

How To Connect MySQL And Auth To A Next.js App
31.50 GEEK