找回密码
 register
搜索
查看: 2293|回复: 0

[游戏教程] centos 8 启动mysql失败 之 File operation call: 'open'.

[复制链接]
  • 打卡等级:本地老炮
  • 打卡总天数:523
  • 打卡月天数:12
  • 打卡总奖励:521
  • 最近打卡:2026-06-14 09:46:51
Waylee 发表于 2021-4-18 19:33 | 显示全部楼层 |阅读模式

马上注册,查看网站隐藏内容!!

您需要 登录 才可以下载或查看,没有账号?register

×
[root@localhost ~]# mysqld --defaults-file=/etc/my.cnf --user=mysql &
[1] 2127
[root@localhost ~]# 210418 19:26:30 [Note] Plugin 'FEDERATED' is disabled.
210418 19:26:30  InnoDB: Initializing buffer pool, size = 8.0M
210418 19:26:30  InnoDB: Completed initialization of buffer pool
210418 19:26:30  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.


考虑到mysql服务使用mysql用户启动的,首先增加mysql用户,

useradd -r mysql

修改目录权限:

cd /var/lib/mysql

chown -R mysql.mysql *


再次启动即可:

[root@localhost mysql]# mysqld --defaults-file=/etc/my.cnf --user=mysql &

[1] 2286

[root@localhost mysql]# 210418 19:31:06 [Note] Plugin 'FEDERATED' is disabled.

210418 19:31:06  InnoDB: Initializing buffer pool, size = 8.0M

210418 19:31:06  InnoDB: Completed initialization of buffer pool

210418 19:31:06  InnoDB: Started; log sequence number 0 341206

210418 19:31:06 [Note] Event Scheduler: Loaded 0 events

210418 19:31:06 [Note] mysqld: ready for connections.

Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)



至此启动成功


您需要登录后才可以回帖 登录 | register

本版积分规则

QQ|雪舞知识库 ( 浙ICP备15015590号-1 | 萌ICP备20232229号|浙公网安备33048102000118号 )|天天打卡

GMT+8, 2026-6-14 21:55 , Processed in 0.053541 second(s), 26 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表