cancel
Showing results for 
Search instead for 
Did you mean: 

MySql DB user no longers has permissions to insert

bridgesystems
Dabbler
Posts: 11
Registered: ‎22-02-2014

MySql DB user no longers has permissions to insert

Hi,
My php script which inserts data into a table ( and worked before migration) now errors with :
INSERT command denied to user 'ccgibridge868385'@'10.130.1.51' for table 'jokes'
(Other scripts with SELECT commands work fine and are using the same DB connection details) 
Searching around, I know I have to run a command like :
GRANT INSERT ON 'db'.'tablename' TO 'username'@'localhost'
However, I can't seem to see the grant command with the MySQL control panel ?
Any help greatly appreciated.
3 REPLIES 3
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,370
Fixes: 75
Registered: ‎06-04-2007

Re: MySql DB user no longers has permissions to insert

The permissions I have for my databases are
SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES
You can find yours by opening MySQL Manager, clicking a database, entering its password then press Login.
If yours lack INSERT I think it would have to be added by Plusnet/Hostopia. I suggest raising a ticket to get that done.
David
David
bridgesystems
Dabbler
Posts: 11
Registered: ‎22-02-2014

Re: MySql DB user no longers has permissions to insert

Thanks for your reply... which helped me to confirm I did indeed have insert permissions.. but script was still getting the error.
But as I now  knew I had INSERT permissions , I had another look at my php code...
The insert statement had the pre migration DB name prefixed..
INSERT INTO  `bridgesystems_pn`.`jokes`
The DB names have changed after migration (its now bridgesystems_pn_ccgi_bridgesystems_plus_com)  ,  as soon as I updated the DB name it worked fine.
Thanks for your help which helped me solve the problem within 15min ( much less than the days the support ticket route would have taken !)
Thanks again..  Smiley Smiley
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,370
Fixes: 75
Registered: ‎06-04-2007

Re: MySql DB user no longers has permissions to insert

Thanks for the feedback. The Hostopia file scanner has obviously missed this instance.
David
David