mysql - CentOS7启动mysql失败
问题描述
解决方案
You can fix this in few steps
- Execute this command to check if mysql user exists:
cat /etc/passwd | grep mysql
- Validate if you have mysql in this file. It should look something like :
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/false
- If mysql user is not present please create that user like this :
useradd -d /var/lib/mysql mysql
- If mysql user is present then make sure mysql user home path in
/etc/passwd
file actually exists and owned by mysql user (in the above case I mentioned/var/lib/mysql
is home path and it has to be owned bymysql
user)
Note: from what ever you have mentioned it looked like mysql user doesn't exist in your system. So it looks like creating the user with home path as /var/lib/mysql
should solve the problem.
推荐阅读
- azure-storage - 损坏的 azure sdk 无法识别本地存储
- python-3.x - 在python split函数上运行forloop时出错
- c# - 认证后将用户信息传递给反应组件
- php - 为什么 laravel 路由必须优先顺序,否则找不到页面?
- ios - iOS 中的 NFC 读取标签
- javascript - 带有固定标题的 scrollIntoView()
- mysql - 2个日期范围查询之间的MySql
- html - 使用 HTMLBody 进行条件格式化
- python - 当变量数量未知时插入 Sqlalchemy
- django - DRF 嵌套模型序列化程序不包含在元数据中