Mysql Errors: can’t find file host.frm or InnoDB: Operating system error number 13 in a file operation
If you get these following errors in your MySQL installtion you should check the following steps.
InnoDB: Started; log sequence number 0 43655
[ERROR] /usr/sbin/mysqld: Can’t find file: ‘./mysql/host.frm’ (errno: 13)
[ERROR] /usr/sbin/mysqld: Can’t find file: ‘./mysql/host.frm’ (errno: 13)
[ERROR] Fatal error: Can’t open and lock privilege tables: Can’t find file: ‘./mysql/host.frm’ (errno: 13)
or
InnoDB: Operating system error number 13 in a file operation
Workarounds
first of all check if your $MYQL_HOME is pointing to the right directory, to test it type in your console “echo $MYSQL_HOME” If your output is empty you should set this variable with your current home place of your SQL Installation. In most of the cases it have to pointing here “/etc/mysql” the place where’s your “my.cnf“. To fill this variable just type in the command “export MYSQL_HOME=/etc/mysql“
the second thing you have to check are the access rights to “/var/lib/mysql” . Please check my rights below or change users and groups to this default with chgrp and chown commands.
-rw-rw—- 1 mysql mysql 5242880 28. Sep 14:15 ib_logfile1
-rw-r–r– 1 root root 0 28. Sep 14:15 debian-5.0.flag
-rw——- 1 root root 7 28. Sep 14:15 mysql_upgrade_info
drwxr-xr-x 2 mysql root 4096 28. Sep 14:15 mysql
-rw-rw—- 1 mysql mysql 10485760 28. Sep 18:42 ibdata1
-rw-rw—- 1 mysql mysql 5242880 28. Sep 18:56 ib_logfile0
and make sure that the content of the mysql folder has all rights of user:mysql and group:mysql => to change this type “chown -R mysql /var/lib/mysql/mysql” to change the group type “chgrp -R mysql /var/lib/mysql/mysql“
now you should start your mysql server without a problem “/etc/init.d/mysql start“
Tags: Errors, export, group, host, host.frm, innodb, installation, mysql, mysqld, mysql_home, root, SQL, user, variables
This entry was posted
on Monday, September 28th, 2009 at 4:09 pm and is filed under WWW, server.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
October 12th, 2009 at 5:44 pm
That would probably be the most important words – super