因为是centos7的,按照帖子上说的
http://www.linuxidc.com/Linux/2016-09/135288.htm
安装的mysql是这样的。
[root@webvps ~]# rpm -qa | grep mysql
mysql57-community-release-el7-8.noarch
mysql-community-client-5.7.20-1.el7.x86_64
mysql-community-libs-5.7.20-1.el7.x86_64
mysql-community-libs-compat-5.7.20-1.el7.x86_64
mysql-community-common-5.7.20-1.el7.x86_64
mysql-community-server-5.7.20-1.el7.x86_64
报错信息
[root@izwz9d8jbsexysap7quc0hz etc]# service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
Job for mysqld.service failed because the control process exited with error code . See "systemctl status mysqld.service" and "journalctl -xe" for details.
[root@izwz9d8jbsexysap7quc0hz etc]# systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor prese t: disabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2017-12-18 18 :04:58 CST; 26ms ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 6820 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysql d/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 6797 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/ SUCCESS)
Dec 18 18:04:58 izwz9d8jbsexysap7quc0hz systemd[1]: Failed to start MySQL Ser...
Dec 18 18:04:58 izwz9d8jbsexysap7quc0hz systemd[1]: Unit mysqld.service enter...
Dec 18 18:04:58 izwz9d8jbsexysap7quc0hz systemd[1]: mysqld.service failed.
Hint: Some lines were ellipsized, use -l to show in full.