ERROR 1146 (42S02): Table 'db.tablename' doesn't exist
I think you might be able to find the answer in the following post:
https://stackoverflow.com/questions/7759170/mysql-table-doesnt-exist-but-it-does-or-it-should

Seems to have the same issue as you.