'Allow a user in JawsDB to make an INSERT statement
I have a deployed app in Heroku and the DB manager is MySQL JawsDB.
I would like to use Navicat to insert data for my users. The app is just for consultation.
I can connect to my JawsDB DB but, when I'm trying to insert new data I get an error 1142 - INSERT command denied to user 'myJawsDBUser'@'myIPAddress' for table 'myTable'.
I checked documentation and says:
If you are on one of JawsDB’s shared plans, you may have breached the database size allotted via your plan. When a database grows larger than the plan allows, INSERT privileges are revoked on the database user until the database is brought back into compliance.
After make a check of the size of my DB, I see that I have less than maximum size plan allows.I think is a problem with privileges, how can I change this if I don't have access to Users table
Solution 1:[1]
You can remove some data if you want to get back below the allowed size limit.
To get an idea of what tables are taking a lot of space:
SELECT * FROM information_schema.tables WHERE table_type = 'BASE TABLE' ORDER BY data_length DESC
Once unnecessary data has been removed from a table, you need to recompute the table size. ANALYZE TABLE table_name and OPTIMIZE TABLE table_name cannot be used since you do not have insert right, but one trick is to update the table engine (with the same value).
For instance, if your tables are using InnoDB:
ALTER TABLE table_name ENGINE=InnoDB
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | remeus |
