Lost connection to MySQL server during query

in query:
select categoryID from SKH_products where productID='823'