Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I found some old files in the mysql datadir:

-rw-rw----  1 mysql mysql     0 2012-10-09 09:39 #sql_263c_0.MYD
-rw-rw----  1 mysql mysql  1.0K 2012-10-09 09:39 #sql_263c_0.MYI
-rw-rw----  1 mysql mysql     0 2012-10-09 09:40 #sql_263c_1.MYD
-rw-rw----  1 mysql mysql  1.0K 2012-10-09 09:40 #sql_263c_1.MYI
-rw-rw----  1 mysql mysql     0 2012-10-09 09:40 #sql_263c_3.MYD
-rw-rw----  1 mysql mysql  1.0K 2012-10-09 09:41 #sql_263c_3.MYI
-rw-rw----  1 mysql mysql  338M 2012-08-21 15:54 #sql_3e03_0.MYD
-rw-rw----  1 mysql mysql  1.0K 2012-08-21 15:52 #sql_3e03_0.MYI
-rw-rw----  1 mysql mysql  694M 2012-08-21 15:54 #sql_3e03_12.MYD
-rw-rw----  1 mysql mysql  1.0K 2012-08-21 15:46 #sql_3e03_12.MYI
-rw-rw----  1 mysql mysql  756M 2012-08-21 15:54 #sql_3e03_13.MYD

I have no idea how does it created, maybe temp tables ? Is it possible to check the files still used by mysqld or can be remove ?

My version is: Server version: 5.0.45-log Source distribution

share|improve this question

1 Answer 1

up vote 2 down vote accepted

By all means, remove them. Those are just temporary tables mysqld had written to disk.

In all likelihood, mysqld probably crashed when those temp tables were made.

Look at the timestamps:

  • Max is 2012-10-09
  • Min is 2012-08-21

The sum of these files are over 1G. They are just taking up room.

I know they are temp tables because

  • MySQL uses MyISAM as the Storage Engine for Temp Tables
  • Temp Tables have no .frm, which prohibit DB sessions from accessing them directly in SQL

You can remove the corresponding .MYI files as well. Those are the index file components of teach temporary MyISAM tables. They are never populated because temp tables are never indexed.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.