I don\'t come here for help often but I am pretty frustrated by this and I am hoping someone has encountered it before.
Whenever I try to fetch records from a table
I had similar problem. In my own case, the problem occurred due to incorrect owner/permission. I just had to change the owner on my data directory to mysql user and this resolved the problem.