Tuesday, January 20, 2009

Mysql (errno: 13) can't find file frm

Recently got this error when I was trying to copy a database on to another server. I basically copied the mysql data directory for the corresponding database on to the new server and logged into mysql client.


mysql> select count(*) from placement;
Can't find file: './main/placement.frm (errno: 13)


Checked the mysql log and this was being reported for the all frm files for all tables in the db. Looks like this is a permission issue on the data directory. Changed to the following permissions and it seemed to work.


server> sudo chmod -R 660 main
server> sudo chmod 775 main

No comments:

Post a Comment