Under ubuntu environment to restart the mysql service error "No directory, logging in with HOME = -"

Prerequisite: environment using the system
3.13.0-24-generic

mysql version: 5.6.33

Error Description:
First using mysqld_safe to start being given as follows:

zabbix-forFunction @ root: ~ # mysqld_safe
. 170 425 01:56:52 mysqld_safe of Can not error log to log and syslog AT Time at The Same, the Remove All --log-error --syslog to the Configuration Options for the Take Effect.
170 425 01: Logging to the mysqld_safe 56:52 '/var/log/mysql/error.log'.
170 425 01:56:52 mysqld Process A the mysqld_safe already EXISTS
the root-forFunction ZABBIX @: ~ # PS -aux | grep MySQL
MySQL 0.1 1472 15.5 1.75226 million 625824? Ssl Apr24 1:16 / usr / sbin / mysqld
the root 920. 15952 10160 0.0 0.0 PTS / S + 01:59 0:00 grep. 3 = Auto --color MySQL
. 1
2
. 3
. 4
. 5
. 6
. 7
that when using the / etc / init .d / mysql stop stopping point mysql mysql service discovery process still exists, this time need to use the following command to stop the process:

@ ZABBIX-forFunction the root: ~ STOP # MySQL the sudo-Service
MySQL STOP / Waiting
the root-forFunction ZABBIX @: ~ # PS -aux | grep MySQL
the root 13531 0.0 0.0 15948 920. PTS / S. 3 + 02:15 0:00 grep --color Auto mysql =
. 1
2
. 3
. 4
use usermod command to reposition mysql directory where:

zabbix-forFunction @ root: ~ # sudo the usermod -d / var / lib / mysql / mysql
1
and then restart the mysql service:

zabbix-forFunction @ root: ~ # sudo Service Start MySQL
MySQL Start / running, Process 13597
---------------------
Author: minxihou
Source: CSDN
Original: https: //blog.csdn.net/minxihou/article/details/70739563
Disclaimer: This article is a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin www.cnblogs.com/ExMan/p/11271836.html