Guidance on Setting Up Shopify Node App with MySQL

Topic summary

A developer is learning Shopify app development and has successfully switched the default SQLite database to MySQL in a Node.js Shopify app template. The MySQL connection works and required tables are automatically created.

Current Issue:

  • The accessToken is not being saved to the database after the OAuth process completes
  • All other database setup appears functional

Suggested Solution:
If using Prisma (common in Shopify templates), run npx prisma deploy to properly deploy the schema to the new MySQL database. Since the setup worked with SQLite, the MySQL configuration should function similarly once the schema is correctly deployed.

Status: Awaiting confirmation whether the Prisma deployment command resolves the token storage issue.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

Hi There,

I hope you’re doing well.

I’m currently learning Shopify app development and working on setting up a Shopify app using the Node.js template with a MySQL database. By default, the DB uses SQLite, but I’ve managed to switch to MySQL and successfully connect it to our database.

However, after installing the app on a store, the accessToken is not being saved to the database. I noticed that the required tables were automatically created by the package in my MySQL database, but the token doesn’t get stored after the OAuth process.

Could you please guide me on how to properly set up the Node.js template app to work with MySQL, especially ensuring that the accessToken is saved correctly?

Regards

Hey @neelesh9979 ,

It’s hard to tell what the issue is from these details. If it was working properly with the SQLite connection, switching to MySQL should work pretty much the same. If you are using prisma with the template make sure you deploy the schema to setup the new DB. Try npx prisma deploy.