Error: select command denied to user ‘‘@’‘ for table ‘

database user does not have the permission to do select query. you can grant the permission to the user if you have root access to mysql http://dev.mysql.com/doc/refman/5.1/en/grant.html Your second query is on different database on different table. And the user you are connecting with does not have permission to access data from this database or … Read more