XiVoid Posted March 8, 2007 Share Posted March 8, 2007 I'm trying to delete an entry from my database, but I always get the following error: DELETE command denied to user 'dbUser' @ 'server' for table 'myTable' The credentials that I am using allow me to insert and update this and other tables. If I run the command in phpMyAdmin: DELETE FROM myTable WHERE recordNo = 12 it executes perfectly. But in my php code: $sql = "DELETE FROM myTable WHERE recordNo = '$recordNo'"; returns the error. I'm using my database's R/W login details. Are there other credentials I should be using? What am I doing wrong? Any help would be appreciated. Please Link to comment https://forums.phpfreaks.com/topic/41758-mysql-entry-delete-from-php/ Share on other sites More sharing options...
skali Posted March 8, 2007 Share Posted March 8, 2007 Seems like the user that you are making connection to MySQL with is not allowed to execute delete commands.. You will have to grant these permission to the user that you are using. Link to comment https://forums.phpfreaks.com/topic/41758-mysql-entry-delete-from-php/#findComment-202447 Share on other sites More sharing options...
XiVoid Posted March 8, 2007 Author Share Posted March 8, 2007 ok. Where would I do that? In phpMyAdmin? Sorry, I'm very new at php and mysql. Link to comment https://forums.phpfreaks.com/topic/41758-mysql-entry-delete-from-php/#findComment-202468 Share on other sites More sharing options...
skali Posted March 8, 2007 Share Posted March 8, 2007 Yes, either phpmyadmin or shell if you have access to it... Link to comment https://forums.phpfreaks.com/topic/41758-mysql-entry-delete-from-php/#findComment-202507 Share on other sites More sharing options...
XiVoid Posted March 8, 2007 Author Share Posted March 8, 2007 thank you, Skali. Link to comment https://forums.phpfreaks.com/topic/41758-mysql-entry-delete-from-php/#findComment-202536 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.