. mysql host.frm_Mysql Can't find file: './mysql/host.frm' (errno: 13) 的解决方法
安装mysql后,使用mysqld_safe启动,错误如下:
[ROOT mysql]$ mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld
InnoDB: Log scan progressed past the checkpoint lsn 0 36808
100313 10:15:09 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
100313 10:15:09 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
100313 10:15:09 InnoDB: Started; log sequence number 0 43655
100313 10:15:09 [ERROR] mysqld: Can't create/write to file '/var/run/mysqld' (Errcode: 21)
100313 10:15:09 [ERROR] Can't start server: can't create PID file: Is a directory
[ROOT mysql]$ mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid
InnoDB: Log scan progressed past the checkpoint lsn 0 36808
100313 10:16:23 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
100313 10:16:23 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
100313 10:16:23 InnoDB: Started; log sequence number 0 43655
100313 10:16:23 [ERROR] mysqld: Can't find file: './mysql/host.frm' (errno: 13)
100313 10:16:23 [ERROR] mysqld: Can't find file: './mysql/host.frm' (errno: 13)
100313 10:16:23 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
呵呵,可能是我太笨了,找了很多论坛,都是说都权限问题,但没找到解决方法,最后在find -iname '*host.frm*'里知道host.frm是在mysql的系统表里,进行系统表查看权限:
[ROOT mysql]$ ll
total 780
-rwxrwx--- 1 root root 8820 2010-03-13 09:20 columns_priv.frm
-rwxrwx--- 1 root root 0 2010-03-13 09:20 columns_priv.MYD
-rwxrwx--- 1 root root 1024 2010-03-13 09:20 columns_priv.MYI
-rwxrwx--- 1 root root 9494 2010-03-13 09:20 db.frm
-rwxrwx--- 1 root root 876 2010-03-13 09:20 db.MYD
-rwxrwx--- 1 root root 4096 2010-03-13 09:20 db.MYI
-rwxrwx--- 1 root root 8665 2010-03-13 09:20 func.frm
-rwxrwx--- 1 root root 0 2010-03-13 09:20 func.MYD
-rwxrwx--- 1 root root 1024 2010-03-13 09:20 func.MYI
-rwxrwx--- 1 root root 8700 2010-03-13 09:20 help_category.frm
-rwxrwx--- 1 root root 20916 2010-03-13 09:20 help_category.MYD
-rwxrwx--- 1 root root 3072 2010-03-13 09:20 help_category.MYI
-rwxrwx--- 1 root root 8612 2010-03-13 09:20 help_keyword.frm
-rwxrwx--- 1 root root 78997 2010-03-13 09:20 help_keyword.MYD
-rwxrwx--- 1 root root 14336 2010-03-13 09:20 help_keyword.MYI
-rwxrwx--- 1 root root 8630 2010-03-13 09:20 help_relation.frm
-rwxrwx--- 1 root root 7425 2010-03-13 09:20 help_relation.MYD
-rwxrwx--- 1 root root 16384 2010-03-13 09:20 help_relation.MYI
-rwxrwx--- 1 root root 8770 2010-03-13 09:20 help_topic.frm
-rwxrwx--- 1 root root 347064 2010-03-13 09:20 help_topic.MYD
-rwxrwx--- 1 root root 17408 2010-03-13 09:20 help_topic.MYI
-rwxrwx--- 1 root root 9416 2010-03-13 09:20 host.frm
-rwxrwx--- 1 root root 0 2010-03-13 09:20 host.MYD
-rwxrwx--- 1 root root 1024 2010-03-13 09:20 host.MYI
-rwxrwx--- 1 root root 9691 2010-03-13 09:20 proc.frm
-rwxrwx--- 1 root root 0 2010-03-13 09:20 proc.MYD
-rwxrwx--- 1 root root 1024 2010-03-13 09:20 proc.MYI
-rwxrwx--- 1 root root 8875 2010-03-13 09:20 procs_priv.frm
-rwxrwx--- 1 root root 0 2010-03-13 09:20 procs_priv.MYD
-rwxrwx--- 1 root root 1024 2010-03-13 09:20 procs_priv.MYI
-rwxrwx--- 1 root root 8947 2010-03-13 09:20 tables_priv.frm
-rwxrwx--- 1 root root 0 2010-03-13 09:20 tables_priv.MYD
-rwxrwx--- 1 root root 1024 2010-03-13 09:20 tables_priv.MYI
-rwxrwx--- 1 root root 8636 2010-03-13 09:20 time_zone.frm
-rwxrwx--- 1 root root 8624 2010-03-13 09:20 time_zone_leap_second.frm
-rwxrwx--- 1 root root 0 2010-03-13 09:20 time_zone_leap_second.MYD
-rwxrwx--- 1 root root 1024 2010-03-13 09:20 time_zone_leap_second.MYI
-rwxrwx--- 1 root root 0 2010-03-13 09:20 time_zone.MYD
-rwxrwx--- 1 root root 1024 2010-03-13 09:20 time_zone.MYI
-rwxrwx--- 1 root root 8606 2010-03-13 09:20 time_zone_name.frm
-rwxrwx--- 1 root root 0 2010-03-13 09:20 time_zone_name.MYD
-rwxrwx--- 1 root root 1024 2010-03-13 09:20 time_zone_name.MYI
-rwxrwx--- 1 root root 8686 2010-03-13 09:20 time_zone_transition.frm
-rwxrwx--- 1 root root 0 2010-03-13 09:20 time_zone_transition.MYD
-rwxrwx--- 1 root root 1024 2010-03-13 09:20 time_zone_transition.MYI
-rwxrwx--- 1 root root 8748 2010-03-13 09:20 time_zone_transition_type.frm
-rwxrwx--- 1 root root 0 2010-03-13 09:20 time_zone_transition_type.MYD
-rwxrwx--- 1 root root 1024 2010-03-13 09:20 time_zone_transition_type.MYI
-rwxrwx--- 1 root root 10330 2010-03-13 09:20 user.frm
-rwxrwx--- 1 root root 224 2010-03-13 09:20 user.MYD
-rwxrwx--- 1 root root 2048 2010-03-13 09:20 user.MYI
晕,原来真是权限问题:
[ROOT mysql]$ chown mysql *
[ROOT mysql]$ chgrp mysql *
[ROOT mysql]$ chmod ug+rwx *
再重启mysql即可
分享到:
2010-03-13 11:13
浏览 42268
分类:数据库
评论
3 楼
763863446
2017-05-12
非常感谢博主,整好解决了问题!!!
2 楼
java_doom
2013-09-09
不错 太赞了 我也遇到同样的问题 看到你这篇才解决
1 楼
thebye85
2010-11-03
原来如此,刚才遇到这个问题。谢谢
. mysql host.frm_Mysql Can't find file: './mysql/host.frm' (errno: 13) 的解决方法相关推荐
- ERROR 1017 (HY000): Can't find file: './hue3/auth_user.frm' (errno: 13 - Permission denied)
简介: mysql> select * from auth_user; ERROR 1017 (HY000): Can't find file: './hue3/auth_user.frm' ( ...
- MySQL下执行select语句输入到一个文件出现“Can’t create/write to file /home/0521b.txt (Errcode: 13)”错误解决方法
这个问题一般是该目录读写权限不足造成的 外场有客户询问要导出已开户的专网手机的大小号和imsi用于比对那些imsi被用了,询问方法? 告知登录服务器,linux提示符下执行登录mysql. mysql ...
- MySQL: 1006 - Can't create database '***' (errno: 13) 错误 解决方法
原文连接:https://blog.csdn.net/kexiaoling/article/details/50259569 如果使用root账号登录到数据库create database时提错错误: ...
- MySQL无法启用/etc/my.cnf配置文件,重启报错Warning: World-writable config file ‘/etc/my.cnf’ is ignored的解决方法
MySQL无法启用/etc/my.cnf配置文件,重启报错Warning: World-writable config file '/etc/my.cnf' is ignored的解决方法 问题分析 ...
- mysql: “Warning: Using a password on the command line interface can be insecure.“ 解决方法
mysql: "Warning: Using a password on the command line interface can be insecure." 解决方法 参考文 ...
- xxx is not in the sudoers file.This incident will be reported.的解决方法
xxx is not in the sudoers file.This incident will be reported.的解决方法 参考文章: (1)xxx is not in the sudoe ...
- MYSQL报错:Error writing file ‘./xxxx/xxxxxx.frm‘ (Errcode: 28 - No space left on
今天在测试环境数据库插入数据时没响应,然后在测试环境服务器上也新建不了文件,直到在测试环境的数据库里建表时,报了一个这个错 错误信息:磁盘空间不足. 之后去服务器上 df -h 查看磁盘空间使用情况, ...
- mysql防止从节点可写数据_mysql 主从数据不一致 Slave_SQL_Running: No 解决方法
在slave服务器上通过如下命令 MysqL> show slave status\G; 显示如下情况: Slave_IO_Running: Yes Slave_sql_Running: No ...
- mysql server 卸载不了_Mysql卸载问题Start Server卡住报错解决方法
遇到的问题:安装mysql最后一步的时候 start server打叉并且报错. 问题截图: 报错代码: Beginning configuration step: Writing configura ...
最新文章
- 学术青年如何克服拖延症——5条技巧助你前进
- Android事件分发机制详解
- python代码雨代码复制_python实现跨excel sheet复制代码实例
- 邓俊辉数据结构学习-3-栈
- 获取今天,昨天,本周,上周,本月,上月时间
- java 异步上传一张图片,java异步上传图片示例
- 单机mongodb最大_mongodb单机多实例主从配置
- 本地 mysql 数据库 上线 服务器_MySQL把本地数据库上传到服务器
- 完美解决doc、docx格式word转换为Html
- 【Git/Github学习笔记】Git常用命令(代码拉取)
- 阶段3 2.Spring_09.JdbcTemplate的基本使用_1 今日课程内容介绍
- 下载与安装JDK以及配置环境变量(详细到每步)
- [USACO10FEB]购买巧克力Chocolate Buying
- Visio2019中插入数学公式
- 如何刷原生android系统版本,小米手机1原生Android4.1系统刷机教程
- 计算机开机总要按f1键,详解Win7系统电脑开机需要按F1键才能启动的解决方法
- New Bing怼人、说谎、PUA,ChatGPT已经开始胡言乱语了
- Allegro教学:关于dangling connection的解释
- HTML 网页打印实现分页打印功能
- C语言学习笔记(XII)---贪吃蛇
热门文章
- 一加手机怎么导出照片_一加手机视频删除了怎么恢复-互盾安卓恢复大师
- 中国手游如何复制“糖果”传奇?
- stm32中实现printf打印
- hdu 4183 Pahom on Water 网络流
- 计算机网络专业单招考试科目,2018年辽宁交专单独招生对口升学类招生计算机网络专业综合课考试大纲...
- 新年芯事 | 龙芯中科通用SOC芯片龙芯2K2000流片成功
- 专升本高数——第三章 一元函数导数的应用【学习笔记】
- 一种基于深度学习的方法来检测摩托车头盔的使用
- uCOS-II PC编译环境搭建(基于BC45)
- 手写Spring-第七章-钩直饵咸?虚拟机钩子与bean的初始化和销毁