Guidance on Setting Up Shopify Node App with MySQL

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.