[转]mysql 启动失败:su: warning: cannot change directory to /nonexistent: No such file or directory


这种错误一般是 mysql 服务器异常关机导致的,解决方案如下:

# Ubuntu
sudo
service mysql stopsudo usermod -d /var/lib/mysql/ mysqlsudo service mysql start

 

# CentOSsudo systemctl stop mysql.servicesudo usermod -d /var/lib/mysql/ mysqlsudo systemctl start mysql.service

 


---------------------
作者:汪成龙的博客
来源:CNBLOGS
原文:https://www.cnblogs.com/cnwcl/p/13805643.html
版权声明:本文为作者原创文章,转载请附上博文链接!
内容解析By:CSDN,CNBLOG博客文章一键转载插件
posted @ 2022-05-28 19:02  JackieZhengChina  阅读(359)  评论(0编辑  收藏  举报