# Database Discussions > MySQL >  sql error

## mmmrafik

im glad to write my problem here to the experts of sql , and very nice that there is this forum to help lol.
my problem is >
i get this error > Database error: Invalid SQL: SELECT * FROM portobel_advert.categories
MySQL Error: 1142 (SELECT command denied to user 'hagdacom_db'@'localhost' for table 'categories')
Session halted.

so i wonder what problem is this and what file is asking and how to fix this pls. 
im ready to give more explication if you need . 
thanks

----------


## intellicon

The most probable reason of error is that user does not have the permission to do select queries. Ask database administrator (or anyone having root access) grant the appropriate permission to the user: 

GRANT SELECT ON portobel_advert.categories TO 'hagdacom_db'@'localhost'

----------

