title: Error: Tablespace for table xxx exists. Please DISCARD the tablespace before IMPORT
body: <p>I am fairly new to MySQL and I am getting a pretty interesting error on which I cannot find any help via google and the stackoverflow search.</p>
  
  <p>I am running a local server of MySQL 5.6.10 on MacOS 10.8.3 and manage my database via Navicat essentials for MySQL.</p>
  
  <p>The error I get is that after running and managing my database just fine for a couple of days/weeks something triggers to (it appears incompletely) delete some of the tables I created using queries from within Navicat.</p>
  
  <p>When I try to run queries using these tables, Navicat then warns me that the particular table does not exist. So far so good - here comes the good part:</p>
  
  <p>When I try to CREATE the table, e.g. named "temp", that was previously there, I get the following error message:</p>
  
  <pre><code>Error : Tablespace for table '`database`.`temp`' exists. Please DISCARD the tablespace before IMPORT.
  </code></pre>
  
  <p>However, if I try to drop the table, or try to discard the tablespace for this table, using</p>
  
  <pre><code>DROP TABLE temp;
  ALTER TABLE temp DISCARD TABLESPACE;
  </code></pre>
  
  <p>I get the following error messages:</p>
  
  <pre><code>Error : Unknown table 'database.temp'
  Error : Table 'database.temp' doesn't exist
  </code></pre>
  
  <p>So that means that I am advised to discard the table space but when I try to do so the table does not exist. Is it possible that there is some type of remnant of this table at a different place where the DISCARD query isn't checking? And does anybody have an idea what could trigger all that - completely randomly as it seems?</p>
  
  <p>As I said, I'm new to the subject and pretty much clueless. I suspect that re-booting my laptop, i.e. resetting my local MySQL server, or maybe user permission rights might have to do with it, but I am just hypothesizing here.</p>