Jump to content

[SOLVED] Error: INSERT command denied to user 'user_name'@'localhost' for table 'table_na


hasnainwasaya

Recommended Posts

I've made my own customized admin panel to edit tables. The script worked fine on my localserver(wamp) but is showing this error when i try to update or insert a record ...select and delete is working fine..

 

Have used same function for update, delete, and insert

 

If anything is unclear please ask me..

???

i used this query

GRANT ALL PRIVILEGES ON shopsinn_appe.* TO 'shopsinn_appe' IDENTIFIED BY 'appe'

 

still having error

 

Access denied for user 'shopsinn_appe'@'localhost' to database 'shopsinn_appe'

  • 1 year later...

remove database name before table name.

 

example:

 

`designweb`.`order`  === > remove `designweb`

 

`designweb`---->database name

`designweb`----->table name

 

wrong:

INSERT INTO `designweb`.`order` (`id` ,`orderid` ,`email` ,`date` ,`product` ,`amount` ,`discount` ,`total` ,`tax` ,`stotal`)VALUES (NULL , '$orderid', '$semail',CURRENT_TIMESTAMP , 'cms','330','0','$total','$tax','$stotal');

Right:

INSERT INTO `order` (`id` ,`orderid` ,`email` ,`date` ,`product` ,`amount` ,`discount` ,`total` ,`tax` ,`stotal`)VALUES (NULL , '$orderid', '$semail',CURRENT_TIMESTAMP , 'cms','330','0','$total','$tax','$stotal')

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.