解决 linux(ubuntu 20.04)下 启动mysql 错误,无法启动服务 报错 Error: 2 (没有那个文件或目录)
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
·
出现状况:
使用命令 servcie mysql start 提示失败
用命令 service mysql status 提示错误 : “Error: 2 (没有那个文件或目录)”
出错背景说明:
64位 ubuntu 20.04系统,之前可以正常运行,后来节省系统资源 用命令:
sudo systemctl disable mysql 关闭了mysql服务的自动启动
后来正好遇到ubuntu 更新了mysql的部分库 二次启动mysql时候出现了这个问题
解决方案:
1. 使用命令 : journalctl -xe 查看启动时候的错误日志 ,发现在尾部错误发生时候有提示 Could not open file '/var/log/mysql/error.log' for error lo.....
2. 创建对应的文件夹 mkdir /var/log/mysql/ ,同时用命令赋予文件夹宽泛权限 chmod 777 /var/log/mysql/
3. service mysql restart 重启服务即可
PS:使用sudo systemctl enable mysql 要注销或者重启来应用修改 (可能)
journalctl -xe 命令可以用上下键来浏览更早以前的日志,ctrl+c 退出
A beautiful web dashboard for Linux
最近提交(Master分支:2 个月前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)