# Innodb - Error: trying to open a table

**URL:** <https://forums.percona.com/t/innodb-error-trying-to-open-a-table/1191>\
**Category:** Other MySQL® Questions\
**Created:** [June 16, 2009, 3:42am UTC](https://forums.percona.com/t/innodb-error-trying-to-open-a-table/1191 "2009-06-16T03:42:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ittec](https://avatars.discourse-cdn.com/v4/letter/i/e274bd/32.png) [@ittec](https://forums.percona.com/u/ittec)\
**Post date:** [June 16, 2009, 3:42am UTC](https://forums.percona.com/t/innodb-error-trying-to-open-a-table/1191/1 "2009-06-16T03:42:11Z")

</div>

Hi

every time MySQL is restarted, MySQL log shows errors of some temporary tables. I don’t know if is a big issue.

Extract of mysqld.log

090616 11:26:02 InnoDB: Error: trying to open a table, but could notInnoDB: open the tablespace file ‘./tmp/#sql2f89\_6ee13\_0.ibd’!InnoDB: Have you moved InnoDB .ibd files around without using theInnoDB: commands DISCARD TABLESPACE and IMPORT TABLESPACE?InnoDB: It is also possible that this is a temporary table #sql…,InnoDB: and MySQL removed the .ibd file for this.

I have the same error for another two files:

./tmp/#sql2f89\_6ed45\_0.ibd’  
./tmp/#sql2f89\_6ed44\_0.ibd’

It’s clear that is related with temporary tables of InnoDB. It’s a bit annoying because every time I restart BD, the log is filled with same errors again.

I ran mysqlcheck to test all tables of all databases and it seems to be ok. But the error is in log yet.

Any suggestion?

Thanks!

---

<div class="post-metadata">

**Author:** ![rajnair0278](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@rajnair0278](https://forums.percona.com/u/rajnair0278)\
**Post date:** [July 14, 2009, 1:01am UTC](https://forums.percona.com/t/innodb-error-trying-to-open-a-table/1191/2 "2009-07-14T01:01:47Z")

</div>

1. What version of MySQL are you presently using?
2. Did you create a temporary innodb table by any chance and mysql crashed before you could drop them?
3. Do you find orphan #sql\*.{frm,ibd} in your tmp directory?

---

<div class="post-metadata">

**Author:** ![januzi](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@januzi](https://forums.percona.com/u/januzi)\
**Post date:** [July 14, 2009, 5:38am UTC](https://forums.percona.com/t/innodb-error-trying-to-open-a-table/1191/3 "2009-07-14T05:38:10Z")

</div>

Did You check cron (crontab, /etc/cron.\*) for a cleaning script ?

---

<div class="post-metadata">

**Author:** ![rajnair0278](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@rajnair0278](https://forums.percona.com/u/rajnair0278)\
**Post date:** [July 14, 2009, 5:55am UTC](https://forums.percona.com/t/innodb-error-trying-to-open-a-table/1191/4 "2009-07-14T05:55:41Z")

</div>

Januzi: Just curious, how is this gonna help?

---

<div class="post-metadata">

**Author:** ![januzi](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@januzi](https://forums.percona.com/u/januzi)\
**Post date:** [July 14, 2009, 6:04am UTC](https://forums.percona.com/t/innodb-error-trying-to-open-a-table/1191/5 "2009-07-14T06:04:27Z")

</div>

Mysql is complaining about missing files, so it could be possible that something removed them.

---

<div class="post-metadata">

**Author:** ![rajnair0278](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@rajnair0278](https://forums.percona.com/u/rajnair0278)\
**Post date:** [July 14, 2009, 6:09am UTC](https://forums.percona.com/t/innodb-error-trying-to-open-a-table/1191/6 "2009-07-14T06:09:27Z")

</div>

Could be, but I suspect thats unlikely the case. I was looking on the net and came across this bug report from mysql.  
[URL][MySQL Bugs: #45443: mysql innodb error](http://bugs.mysql.com/bug.php?id=45443.%5B/URL%5D) You feel this is related?

---

<div class="post-metadata">

**Author:** ![ittec](https://avatars.discourse-cdn.com/v4/letter/i/e274bd/32.png) [@ittec](https://forums.percona.com/u/ittec)\
**Post date:** [July 14, 2009, 6:09am UTC](https://forums.percona.com/t/innodb-error-trying-to-open-a-table/1191/7 "2009-07-14T06:09:39Z")

</div>

1. MySQL version: 5.0.45-log
2. Honestly, I don’t know (
3. Im pretty sure of found orphan #sql\* on /tmp when issue happened. But my first action was remove them. I don’t know if was a good choice, in fact, I don’t know what is this kind of file. Is a temporary table manually created by a user?

Actually BD is working well now but Im sure that if I restart BD the message will show again on log files. But it seems is not a big deal, isn’t it?

Thanks by your replies.

---

<div class="post-metadata">

**Author:** ![rajnair0278](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@rajnair0278](https://forums.percona.com/u/rajnair0278)\
**Post date:** [July 14, 2009, 6:18am UTC](https://forums.percona.com/t/innodb-error-trying-to-open-a-table/1191/8 "2009-07-14T06:18:20Z")

</div>

Ok. I posted a wrong bug report link earlier. This one is what I was hinting at. Did you go through a similar scenario like what is explained here?

[URL][MySQL Bugs: #20867: InnoDB Bug - create temporary table+crash =\> mysqld needs to clean up](http://bugs.mysql.com/bug.php?id=20867.%5B/URL%5D)

Doesn’t seem like a big deal but its definitely an aberration to say the least. :roll:
