操作系统:Centos 7 Linux 3.10.0-229.el7.x86_64
MySQL:mysql57-community-release-el7-7.noarch.rpm
我安装了MySQL服务器yum
.当我运行时,systemctl start mysqld
我得到以下错误
mysqld.service的工作失败了.有关详细信息,请参阅'systemctl status mysqld.service'和'journalctl -xn'.
systemctl status mysqld.service
MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled) Active: failed (Result: start-limit) since Sun 2015-12-06 03:14:54 GMT; 4min 7s ago Process: 6992 ExecStart=/usr/sbin/mysqld --daemonize $MYSQLD_OPTS (code=exited, status=1/FAILURE) Process: 6971 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS) Dec 06 03:14:54 localhost.localdomain systemd[1]: mysqld.service: control process exited, code=exited status=1 Dec 06 03:14:54 localhost.localdomain systemd[1]: Failed to start MySQL Server. Dec 06 03:14:54 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state. Dec 06 03:14:54 localhost.localdomain systemd[1]: mysqld.service holdoff time over, scheduling restart. Dec 06 03:14:54 localhost.localdomain systemd[1]: Stopping MySQL Server... Dec 06 03:14:54 localhost.localdomain systemd[1]: Starting MySQL Server... Dec 06 03:14:54 localhost.localdomain systemd[1]: mysqld.service start request repeated too quickly, refusing to start. Dec 06 03:14:54 localhost.localdomain systemd[1]: Failed to start MySQL Server. Dec 06 03:14:54 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state. The journal command reads Failed to start MySQL Server
还有什么想法我还应该关注什么?
检查以下内容以解决问题
使用以下命令检查mysql数据目录的权限.所有权应为mysql:mysql,目录权限应为700
#LS -ld的/ var/lib中/ MySQL的/
使用以下命令检查mysql data dir中数据库的权限.对于该目录中的所有文件,所有权应该是mysql:mysql
#LS -lh在/ var/lib中/ MySQL的/
使用以下命令检查侦听网络tcp端口
#netstat的-ntlp
使用以下命令检查mysql日志文件是否有任何错误.
#猫/var/log/mysql/mysqld.log
尝试使用以下命令启动mysql
#mysqld_safe的--defaults文件=的/ etc/my.cf