以前一直用 Debian 系,照着官方文档一路装过来都没啥问题,最近想换口味装了个 CentOS 7 ,结果一个 MySQL 就搞了一晚上没搞定。。
大致过程,从官网下了个 Yum Repository
# rpm -ivh mysql57-community-release-el7-8.noarch.rpm
# yum update
# yum install mysql-community-server
一路顺利,然后启动
# systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
报错,照着提示看了下发现并不能看懂。。对着一些信息搜索也无果,求教是什么原因
# systemctl status mysqld.service
mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Tue 2016-05-10 08:03:40 CST; 1min 11s ago
Process: 5126 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 5104 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
May 10 08:03:40 FVCKGFW systemd[1]: Failed to start MySQL Server.
May 10 08:03:40 FVCKGFW systemd[1]: Unit mysqld.service entered failed state.
May 10 08:03:40 FVCKGFW systemd[1]: mysqld.service failed.
May 10 08:03:40 FVCKGFW systemd[1]: mysqld.service holdoff time over, scheduling restart.
May 10 08:03:40 FVCKGFW systemd[1]: start request repeated too quickly for mysqld.service
May 10 08:03:40 FVCKGFW systemd[1]: Failed to start MySQL Server.
May 10 08:03:40 FVCKGFW systemd[1]: Unit mysqld.service entered failed state.
May 10 08:03:40 FVCKGFW systemd[1]: mysqld.service failed.
# journalctl -xe
-- Subject: Unit mysqld.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysqld.service has begun starting up.
May 10 08:03:40 FVCKGFW mysqld[5126]: Initialization of mysqld failed: 0
May 10 08:03:40 FVCKGFW systemd[1]: mysqld.service: control process exited, code=exited status=1
May 10 08:03:40 FVCKGFW systemd[1]: Failed to start MySQL Server.
-- Subject: Unit mysqld.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysqld.service has failed.
--
-- The result is failed.
May 10 08:03:40 FVCKGFW systemd[1]: Unit mysqld.service entered failed state.
May 10 08:03:40 FVCKGFW systemd[1]: mysqld.service failed.
May 10 08:03:40 FVCKGFW systemd[1]: mysqld.service holdoff time over, scheduling restart.
May 10 08:03:40 FVCKGFW systemd[1]: start request repeated too quickly for mysqld.service
May 10 08:03:40 FVCKGFW systemd[1]: Failed to start MySQL Server.
-- Subject: Unit mysqld.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysqld.service has failed.
--
-- The result is failed.
May 10 08:03:40 FVCKGFW systemd[1]: Unit mysqld.service entered failed state.
May 10 08:03:40 FVCKGFW systemd[1]: mysqld.service failed.
1
doyel 2016-05-09 23:08:59 +08:00
配置文件呢。。。还是没指定配置文件启动的?
|
2
yangqi 2016-05-09 23:11:58 +08:00
看 mysql 自己的 error log
|
3
raysonx 2016-05-09 23:18:14 +08:00 via Android
其实我想知道为什么楼主不用自带的 MariaDB ,非要用 rpm 安装 MySQL
|
4
Sparetire OP 刚刚发完贴就找到答案。。 https://stackoverflow.com/questions/34113689/job-for-mysqld-service-failed-centos-7 ,还是自己坑了,结贴,感谢各位
|
6
Neveroldmilk 2016-05-10 10:45:49 +08:00
没配置好 mysql 就启动了吧。
|
7
xsseroot 2016-05-10 11:27:15 +08:00
重启
|