hasnainwasaya Posted December 19, 2008 Share Posted December 19, 2008 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.. ??? Quote Link to comment https://forums.phpfreaks.com/topic/137727-solved-error-insert-command-denied-to-user-user_namelocalhost-for-table-table_na/ Share on other sites More sharing options...
premiso Posted December 19, 2008 Share Posted December 19, 2008 You need to add the permission to insert via the admin panel when you create a user. Look into the GRANT keyword for MySQL for proper usage. Quote Link to comment https://forums.phpfreaks.com/topic/137727-solved-error-insert-command-denied-to-user-user_namelocalhost-for-table-table_na/#findComment-719923 Share on other sites More sharing options...
hasnainwasaya Posted December 19, 2008 Author Share Posted December 19, 2008 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' Quote Link to comment https://forums.phpfreaks.com/topic/137727-solved-error-insert-command-denied-to-user-user_namelocalhost-for-table-table_na/#findComment-719931 Share on other sites More sharing options...
premiso Posted December 19, 2008 Share Posted December 19, 2008 You have to run that query from the root mysql account or an account that is allowed to grant privileges. Quote Link to comment https://forums.phpfreaks.com/topic/137727-solved-error-insert-command-denied-to-user-user_namelocalhost-for-table-table_na/#findComment-719936 Share on other sites More sharing options...
sridharkalaibala Posted August 7, 2010 Share Posted August 7, 2010 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') Quote Link to comment https://forums.phpfreaks.com/topic/137727-solved-error-insert-command-denied-to-user-user_namelocalhost-for-table-table_na/#findComment-1096193 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.