aTei aTei - 1 year ago 126
MySQL Question

Can't find file: './ci/users.frm' (errno: 13)

I installed LAMP on Ubuntu 11.04 and copy project from Windows.
PHP directory (/ci/) to var/www/
MySQL project directory (/ci/) to var/lib/mysql/

Full text of error that i get:

A Database Error Occurred

Error Number: 1017
Can't find file: './ci/users.frm' (errno: 13)
SELECT COUNT(*) AS `numrows` FROM (`users`) WHERE `email` = ''

I googled that its permission problem, but don't know what do next.

Log from /var/log/mysql/error.log:

110622 19:27:21 [ERROR] /usr/sbin/mysqld: Can't find file: './ci/users.frm' (errno: 13)

Answer Source

Permissions problem meaning the permissions on the file. MySQL probably can't read it. Just change the owner and group to mysql and it should work.

chown mysql:mysql /var/lib/mysql/ci/*
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download