Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

mysql

heroku

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

  • migrated using a dump and re-import using mysql command line. eye balled exported data and it seems to be there (user emails etc)
  • all config vars look ok (DATABASE_URL is mysql2...)
  • i can login to the database via the url

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

thanks Ben

like image 607
Ben Avatar asked Nov 04 '16 03:11

Ben


People also ask

How do I connect jawsdb to Heroku?

Adding a JawsDB plan to your Heroku app gives access to a fully-functional MySQL database with no barriers or hoops to jump through. Connect to your instance the way you would to any other MySQL server. JawsDB can be attached to a Heroku application via the CLI:

How to dump a MySQL database from Heroku?

Step 1 - Find Your MySQL Credentials in Heroku You want to go to your MySQL dashboard in Heroku and find your: Host Username Password Database Your Heroku Dashboard for MySQL can be found here. No, I don't know why it is called "jawsdb"; some kind of shark fetish perhaps … Step 2 - Dump Your Database Locally

How to find your mysql credentials in Heroku?

Step 1 - Find Your MySQL Credentials in Heroku You want to go to your MySQL dashboard in Heroku and find your: Host Username Password Database Your Heroku Dashboard for MySQL can be found here. No, I don't know why it is called "jawsdb"; some kind of shark fetish perhaps …

How do I connect to a MySQL database using jawsdb?

Once JawsDB has been added, a JAWSDB_URL setting will be available in the app configuration and will contain the MySQL connection string. Your MySQL database will be created from scratch and will require a few minutes to become fully available. The JAWSDB_URL config variable will contain a placeholder until the database is ready.


1 Answers

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.

like image 128
Raymundus Avatar answered Sep 29 '22 20:09

Raymundus