title: MySQL > Table doesn't exist. But it does (or it should)
body: <p>I changed the datadir of a MySQL installation and all the bases moved correctly except for one. 
  I can connect and <code>USE</code> the database. <code>SHOW TABLES</code> also returns me all the tables correctly, and the files of each table exists on the MySQL data directory.</p>
  
  <p>However, when I try to <code>SELECT</code> something from the table, I get an error message that the table does not exist. Yet, this does not make sense since I was able to show the same table through <code>SHOW TABLES</code> statement. </p>
  
  <p>My guess is that <code>SHOW TABLES</code> lists file existence but does not check whether a file is corrupted or not. Consequently, I can list those files but not access them.</p>
  
  <p>Nevertheless, it is merely a guess. I have never seen this before. Now, I cannot restart the database for testing, but every other application that uses it is running fine.
  But that's just a guess, I've never seen this before. </p>
  
  <p>Does anyone know why this is happening?</p>
  
  <p>Example:</p>
  
  <pre><code>mysql&gt; SHOW TABLES;
  +-----------------------+
  | Tables_in_database    |
  +-----------------------+
  | TABLE_ONE             |
  | TABLE_TWO             |
  | TABLE_THREE           |
  +-----------------------+
  mysql&gt; SELECT * FROM TABLE_ONE;
  ERROR 1146 (42S02): Table 'database.TABLE_ONE' doesn't exist
  </code></pre>