[MY-013276] [Server] Failed to set datadir to ‘/usr/local/mysql/data/‘ (OS errno: 13 - Permission de
使用root账户安装了mysql启动异常如何解决和启动
·
背景
使用root账户安装了mysql
启动异常
问题
A1 直接使用mysqld 启动报错如下
[Server] Failed to set datadir to '/usr/local/mysql/data/' (OS errno: 13 - Permission denied)
看着是权限不够,升级个权限吧。。
A2 切换至root账户启动
2022-03-01T13:47:50.047941Z 0 [ERROR] [MY-010123] [Server] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
解决
B1
mysqld 命令指定用户
--user=root
--user=mysql
都可以, 但是使用root用户后,因为提升了相关权限,不能再降级到mysql用户。
B2
在/etc/my.cnf配置启动用户
user=root
参考
[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as r_有一种人仅仅是认识就很好了的博客-CSDN博客
MySQL错误记录(1)--File './binlog.index' not found_YoFog的博客-CSDN博客_mysql-binlog.index
更多推荐
已为社区贡献2条内容
所有评论(0)