[ERROR] /usr/local/mysql55/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介: 再一次做mysql测试的时候,启动mysql,碰到了[ERROR] /usr/local/mysql55/bin/mysqld: Can't find file: './mysql/host.
再一次做mysql测试的时候,启动mysql,碰到了

[ERROR] /usr/local/mysql55/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)

查看err日志:

***************整理后的片段****************
120704 12:58:37 [ERROR] /usr/local/mysql55/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
120704 12:58:37 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
120704 12:59:33 [Note] Plugin 'FEDERATED' is disabled.
/usr/local/mysql55/bin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
120704 12:59:33 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
120704 12:59:33  InnoDB: Error: trying to open a table, but could not
InnoDB: open the tablespace file './zsd/t1.ibd'!
120704 12:59:34 [ERROR] /usr/local/mysql55/bin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
120704 12:59:34 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
120704 12:59:34 mysqld_safe mysqld from pid file /data/mysqldata/3306/mysql.pid ended
***************整理后的片段****************

红字明确了最重要的片段。当然,120704代表的是当天日期,要分析的时候,可以grep当天日期,查看err日志。

由于我之前做了数据目录的cp

只要对数据的权限做一些更改
[root@localhost 3306]# chown mysql:mysql ./*

重新启动mysql服务,即可

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
4月前
|
关系型数据库 MySQL
MySQL 报错 [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file
MySQL 报错 [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file
333 0
|
3月前
|
关系型数据库 MySQL
ERROR 1449 (HY000): The user specified as a definer (‘mysql.infoschema‘@‘localhost‘) does not exist
ERROR 1449 (HY000): The user specified as a definer (‘mysql.infoschema‘@‘localhost‘) does not exist
21 0
|
3月前
|
SQL 数据采集 关系型数据库
如何解决MySQL报错 You have an error in your SQL syntax; check the manual that corresponds to your MySQL?
如何解决MySQL报错 You have an error in your SQL syntax; check the manual that corresponds to your MySQL?
|
25天前
|
关系型数据库 MySQL 数据安全/隐私保护
MySQL连接ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password‘ cannot be loaded
MySQL连接ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password‘ cannot be loaded
27 0
|
4月前
|
关系型数据库 MySQL 数据库
Mysql-错误处理: Found option without preceding group in config file
Mysql-错误处理: Found option without preceding group in config file
150 0
|
4月前
|
SQL 关系型数据库 MySQL
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
27 0
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
|
4月前
|
关系型数据库 MySQL Linux
远程连接mySQL数据库服务器出现错误号码****:Can‘t connect to mySQL server on ‘192.168.***.***‘ (0)
远程连接mySQL数据库服务器出现错误号码****:Can‘t connect to mySQL server on ‘192.168.***.***‘ (0)
57 0
|
4月前
|
关系型数据库 MySQL
【XAMPP启动mysql报错】Port 3306 in use by ““C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld“……
【XAMPP启动mysql报错】Port 3306 in use by ““C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld“……
|
5月前
|
Oracle 关系型数据库 MySQL
MySQL语句执行报错You can‘t specify target table for update in FROM clause
MySQL语句执行报错You can‘t specify target table for update in FROM clause
50 0
|
3天前
|
SQL 存储 关系型数据库
MySQL Cluster集群安装及使用
MySQL Cluster集群安装及使用