1 o'clock in the morning, daily brush mobile phone, e-mail message Alarm, a glance, disk what what, did not care, dozens of e-mails a day, numb. 7 in the morning, still not awake, the boss call me, website 502, a jiling up landing site, found 502
Check the process, found that MySQL problem, directlyservice mysql stop ,service mysql start
。数据库 ,然后凉凉了,mysql起不起来
[[email protected] data]
# service mysql start
Starting MySQL..The server quit without updating PID
file
(/[FAILED]ql/mysql/pid).
Before the start is good ah, the start is no problem ah, OK, look at the my.cnf file, a: Vim/etc/my.cnfpid-file =/data/mysql/mysql.pid Specify the PID file path AH then Baidu, read the answer of the Netizen:
(1) Be sure to give authorization to, for example,/data/mysql
Chown-r Mysql:mysql/data/mysql
(2) If the authorization is not so, you can create a/data/mysql under the host name of the PID, such as my host name is centos-6.3
You can cd/data/mysql && touch centos-6.3.pid
Write a PID number that is not in the process.
It doesn't seem to have any eggs.
I'm here directly
One: Mv/etc/my.cnf/etc/my.cnf.bak
Two: service mysql start
# #OK started up.
Then a PID file is/data/mysq under the
[Email protected] ~]$ Ls-lh/data/mysql/iz233xdnwmfz.pid
-RW-RW----1 MySQL mysql 4 13:49/data/mysql/iz233xdnwmfz.pid
Three: MV/ETC/MY.CNF.BAK/ETC/MY.CNF
Four: Modify the My.cnf file
Pid-file =/data/mysql/mysql.pid modified to Pid-file =/data/mysql/iz233xdnwmfz.pid
Five:service mysql restart
Okay, the boot's done.
# # #看下mysql错误文件 To see what causes the database to go wrong
[Email protected] ~]$ Tail/data/mysql/mysql-error.log
/backup/binlog_dir/mysql-bin.000448 ' (errcode:28- No spaceleft on device). Waiting for someone-free space ...
2018-05-22 06:30:52 27335 [Warning] Retry in secs. Messag
All right, the disk's full.
Mysql-starting MySQL. The server quit without updating PID file (/[failed]ql/mysql/pid)