环境:Centos8 按照 MySQL 安装 教程操作,到下面这步出现报错: # systemctl start MysqldJob for mysqld.service failed because the control process
环境:Centos8
# systemctl start MysqldJob for mysqld.service failed because the control process exited with error code.See "systemctl status mysqld.service" and "journalctl -xe" for details.
根据提示用 systemctl status mysqld.service 看了下
# systemctl status mysqld.service● mysqld.service - MySQL 8.0 database server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2022-02-24 16:45:08 CST; 50s ago Process: 64678 ExecStopPost=/usr/libexec/mysql-wait-stop (code=exited, status=0/SUCCESS) Process: 64676 ExecStart=/usr/libexec/mysqld --basedir=/usr (code=exited, status=1/FAILURE) Process: 64639 ExecStartPre=/usr/libexec/mysql-prepare-db-dir mysqld.service (code=exited, status=0> Process: 64615 ExecStartPre=/usr/libexec/mysql-check-socket (code=exited, status=0/SUCCESS) Main PID: 64676 (code=exited, status=1/FAILURE) Status: "Server startup in progress" Error: 13 (Permission denied)Feb 24 16:45:08 iZm5e211s4jw7g4w6pgezgZ systemd[1]: Starting MySQL 8.0 database server...Feb 24 16:45:08 iZm5e211s4jw7g4w6pgezgZ systemd[1]: mysqld.service: Main process exited, code=exited,>Feb 24 16:45:08 iZm5e211s4jw7g4w6pgezgZ systemd[1]: mysqld.service: Failed with result 'exit-code'.Feb 24 16:45:08 iZm5e211s4jw7g4w6pgezgZ systemd[1]: Failed to start MySQL 8.0 database server.
大概了解是权限问题导致启动失败 Error: 13 (Permission denied)
根据 Stack Overflow 上相关问题,查了下日志
# tail -f /var/log/mysql/mysqld.log 2022-02-24T08:59:57.903279Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.2022-02-24T08:59:57.903352Z 0 [ERROR] [MY-010119] [Server] Aborting2022-02-24T08:59:57.903491Z 0 [System] [MY-010910] [Server] /usr/libexec/mysqld: Shutdown complete (mysqld 8.0.26) Source distribution.2022-02-24T09:00:45.597420Z 0 [System] [MY-010116] [Server] /usr/libexec/mysqld (mysqld 8.0.26) starting as process 648932022-02-24T09:00:45.604647Z 0 [Warning] [MY-010075] [Server] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 40a3Dc29-9550-11ec-9b66-00163e04afe8.mysqld: File '/var/lib/mysql/auto.cnf' not found (OS errno 13 - Permission denied)2022-02-24T09:00:45.604725Z 0 [ERROR] [MY-010183] [Server] Failed to create file(file: '/var/lib/mysql/auto.cnf', errno 13)2022-02-24T09:00:45.604750Z 0 [ERROR] [MY-010076] [Server] Initialization of the server's UUID failed because it could not be read from the auto.cnf file. If this is a new server, the initialization failed because it was not possible to generate a new UUID.2022-02-24T09:00:45.604831Z 0 [ERROR] [MY-010119] [Server] Aborting2022-02-24T09:00:45.605061Z 0 [System] [MY-010910] [Server] /usr/libexec/mysqld: Shutdown complete (mysqld 8.0.26) Source distribution.
**注意:日志目录可能会不一样,通常长这样 /var/log/mysql
检查了下,当前用户就是root用户,但是直接用
chown -R mysql.mysql /var/lib/mysql/
并没有成功授权
sudo chown -R mysql.mysql /var/lib/mysql/
执行之后就可以正常启动了
来源地址:https://blog.csdn.net/qq_36296794/article/details/123117151
--结束END--
本文标题: 启动mysql报错:Job for mysqld.service failed because the control process exited with error code.See “sys
本文链接: https://www.lsjlt.com/news/395135.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-22
2024-05-22
2024-05-22
2024-05-22
2024-05-22
2024-05-22
2024-05-22
2024-05-21
2024-05-21
2024-05-21
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
一口价域名售卖能注册吗?域名是网站的标识,简短且易于记忆,为在线用户提供了访问我们网站的简单路径。一口价是在域名交易中一种常见的模式,而这种通常是针对已经被注册的域名转售给其他人的一种方式。
一口价域名买卖的过程通常包括以下几个步骤:
1.寻找:买家需要在域名售卖平台上找到心仪的一口价域名。平台通常会为每个可售的域名提供详细的描述,包括价格、年龄、流
443px" 443px) https://www.west.cn/docs/wp-content/uploads/2024/04/SEO图片294.jpg https://www.west.cn/docs/wp-content/uploads/2024/04/SEO图片294-768x413.jpg 域名售卖 域名一口价售卖 游戏音频 赋值/切片 框架优势 评估指南 项目规模
0