VPS侦探论坛

 找回密码
 注册
查看: 5946|回复: 3

mysql 开启不了

[复制链接]
发表于 2015-11-12 13:55:21 | 显示全部楼层 |阅读模式

Linux pub-PowerEdge-R820 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64
Linux  内核版本:3.19.0-25-generic

151112 09:54:02 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
151112  9:54:02 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!

151112  9:54:02 [ERROR] Aborting

151112  9:54:02 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

151112 09:54:02 mysqld_safe mysqld from pid file /usr/local/mysql/var/pub-PowerEdge-R820.pid ended
151112 09:54:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
151112  9:54:03 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!

151112  9:54:03 [ERROR] Aborting

151112  9:54:03 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

151112 09:54:03 mysqld_safe mysqld from pid file /usr/local/mysql/var/pub-PowerEdge-R820.pid ended
151112 10:07:00 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
151112 10:07:00 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!

151112 10:07:00 [ERROR] Aborting

151112 10:07:00 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

151112 10:07:00 mysqld_safe mysqld from pid file /usr/local/mysql/var/pub-PowerEdge-R820.pid ended
151112 10:59:40 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
151112 10:59:40 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!

151112 10:59:40 [ERROR] Aborting

151112 10:59:40 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

151112 10:59:40 mysqld_safe mysqld from pid file /usr/local/mysql/var/pub-PowerEdge-R820.pid ended
151112 12:10:48 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
151112 12:10:48 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!

151112 12:10:48 [ERROR] Aborting

151112 12:10:48 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

151112 12:10:48 mysqld_safe mysqld from pid file /usr/local/mysql/var/pub-PowerEdge-R820.pid ended
151112 12:14:55 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
151112 12:14:55 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!

151112 12:14:55 [ERROR] Aborting


ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)



美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-11-12 17:12:54 | 显示全部楼层


检查一下mysql用户和用户组是否存在
没有的话
groupadd mysql
useradd -s /sbin/nologin -M -g mysql mysql
进行添加
再ls -la /usr/local/mysql/bin/
ls -la /usr/local/mysql/var/ 看一下权限
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-1-25 11:27:10 | 显示全部楼层

请问正常权限应该是什么样的?


再ls -la /usr/local/mysql/bin/
ls -la /usr/local/mysql/var/ 看一下权限
请问正常权限应该是什么样的?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-1-25 12:04:24 | 显示全部楼层

回复 3# 的帖子




属主和属组都应该是mysql
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-17 01:43 , Processed in 0.026701 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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