speedblog Posted March 10, 2011 Share Posted March 10, 2011 Hello everyone, I have a mystery problem I have a script run well in my local machine. Everything was okay until I uploaded the scripts into a web hosting. The script supposed to select field in a table. User geekprog_sistem already granted all privilege to the database but it reporting to display. SELECT command denied to user 'geekprog_sistem'@'localhost' for table 'SUBJEK' Below is my query <?php $result = mysql_query ("SELECT * FROM GEEKPROG_MYPELAJAR.SUBJEK WHERE idpelajar = $idpelajar") or die (mysql_error()); while ($row = mysql_fetch_array ($result)) { } mysql_close ($conn); ?> This query is executed right after I logged in. The mystery was, SELECT command to pick user and password was success, but when It come to the logged page to another SELECT command, it displayed as above error. I hope anyone here can help me to solve the matters....Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/230237-select-command-denied-to-user/ Share on other sites More sharing options...
topcat Posted March 10, 2011 Share Posted March 10, 2011 Have you checked table level privileges? Quote Link to comment https://forums.phpfreaks.com/topic/230237-select-command-denied-to-user/#findComment-1185688 Share on other sites More sharing options...
speedblog Posted March 10, 2011 Author Share Posted March 10, 2011 @tomcat how am i supposed to check on that...before i created the user, the user has been set up to have all previleges. Quote Link to comment https://forums.phpfreaks.com/topic/230237-select-command-denied-to-user/#findComment-1185890 Share on other sites More sharing options...
fenway Posted March 11, 2011 Share Posted March 11, 2011 SHOW GRANTS. Quote Link to comment https://forums.phpfreaks.com/topic/230237-select-command-denied-to-user/#findComment-1185957 Share on other sites More sharing options...
speedblog Posted March 11, 2011 Author Share Posted March 11, 2011 Every information lead to this problem is as above...Damn, I feel dizzy right now, its almost 20 hours I've been thinking about this problem... Quote Link to comment https://forums.phpfreaks.com/topic/230237-select-command-denied-to-user/#findComment-1186040 Share on other sites More sharing options...
TOA Posted March 11, 2011 Share Posted March 11, 2011 You don't have a FROM in that last query, might be an issue, but probably not the one you started the OP about Quote Link to comment https://forums.phpfreaks.com/topic/230237-select-command-denied-to-user/#findComment-1186153 Share on other sites More sharing options...
speedblog Posted March 13, 2011 Author Share Posted March 13, 2011 thank u, my problem solved...i never tought sql is very case sensistive to table name... Quote Link to comment https://forums.phpfreaks.com/topic/230237-select-command-denied-to-user/#findComment-1186857 Share on other sites More sharing options...
fenway Posted March 13, 2011 Share Posted March 13, 2011 thank u, my problem solved...i never tought sql is very case sensistive to table name... It is on case-sensitive file systems -- it has no choice. Quote Link to comment https://forums.phpfreaks.com/topic/230237-select-command-denied-to-user/#findComment-1187011 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.