1

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

1 Answer 1

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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