aTei aTei - 5 months ago 51
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)


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/*