找不到文件:“./ci/users.frm"(错误号:13)
我在 Ubuntu 11.04 上安装了 LAMP 并从 Windows 复制项目.PHP 目录 (/ci/) 到 var/www/和MySQL项目目录(/ci/)到var/lib/mysql/
I installed LAMP on Ubuntu 11.04 and copy project from Windows. PHP directory (/ci/) to var/www/ and MySQL project directory (/ci/) to var/lib/mysql/
我得到的错误全文:
A Database Error Occurred
Error Number: 1017
Can't find file: './ci/users.frm' (errno: 13)
SELECT COUNT(*) AS `numrows` FROM (`users`) WHERE `email` = 'admin@localsite.com'
我在谷歌上搜索了它的权限问题,但不知道下一步该怎么做.
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)
推荐答案
权限问题意味着文件的权限.MySQL 可能无法读取它.只需将所有者和组更改为 mysql 即可.
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/*
相关文章