Ben
Ben

Reputation: 1342

Jawsdb on heroku, new database post migration, (Mysql2::Error: INSERT command denied to user..?)

Deployed a new version of our app on heroku and migrated over database from previous free jawsdb instance. However now every time user signs up gives

(Mysql2::Error: INSERT command denied to user <username for instance

what have i missed

I have not had to grant access or anything like that before, anyone come across this?

thanks Ben

Upvotes: 6

Views: 2247

Answers (3)

Kalnode
Kalnode

Reputation: 11384

Check your migration

e.g. Make sure the database name matches.

For me, I got the same error as OP when trying to migrate my data. This was a fresh account with only a 50kb'ish database; nowhere close to the free-plan 5mb limit.

In my SQL export statement, my local database name is being used, however the remote MySQL (ie JawsDB) service auto-generates a db name, which will obviously not be the same. Simply used find-replace to change the database name to match remote; everything works.

Upvotes: 0

Raymundus
Raymundus

Reputation: 2472

My guess is they disabled your INSERT grant because you have reached your max Storage Capacity for your plan.

To validate this is a permissions problem, log into a MySQL prompt with the user the app is running as, and enter this query:

SHOW GRANTS;

It probably list many, but no INSERT.

Upvotes: 9

Sukhbir
Sukhbir

Reputation: 661

See this link. As explained in given link, jawsdb preliminary plan does not give you permission to add a new database. You are provided with one schema with some random name and you have to work with that only.

Upvotes: 0

Related Questions