第一次:
service mysqld start
报错;
Warning: World-writable config file '/etc/my.cnf' is ignored
Starting MySQL.Warning: World-writable config file '/etc/my.cnf' is ignored
Warning: World-writable config file '/etc/my.cnf' is ignored
Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
...The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]
处理过程:查看错误文件 有提示Can't start server : Bind on unix socket: Permission denied
执行命令:chmod 644 /etc/my.cnf
第二次 service mysqld start
报错 :Starting MySQL.190604 22:17:37 mysqld_safe Directory '/var/lib/mysql' for UNIX socket file don't exists.
The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]
处理过程:查看文件夹是否存在,确实没存在,创建目录;
第三次 service mysqld start
报错:Starting MySQL....The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]
这个是最头疼的 百度了一天 中间还重新卸载从新安装过一次。。还发现了网上部分博客来回抄袭的严重!
尝试过程。。
[root@localhost mysql]# service mysqld start
Starting MySQL....The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]
[root@localhost mysql]# service mysqld status
MySQL is not running, but lock file (/var/lock/subsys/mysql) exists[失败]
[root@localhost mysql]# chmod -R 755 /usr/local/mysql/data
[root@localhost mysql]# service mysqld status
MySQL is not running, but lock file (/var/lock/subsys/mysql) exists[失败]
[root@localhost mysql]# service mysqld start
Starting MySQL....The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]
[root@localhost mysql]# ps -ef|grep mysqld
root 79417 77519 0 22:26 pts/0 00:00:00 grep --color=auto mysqld
[root@localhost mysql]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
"/etc/selinux/config" 14L, 546C written
[root@localhost mysql]# reboot
最后处理过程==========应该是重点吧=============
[root@localhost mysql]# service mysqld start
Starting MySQL.Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
...The server quit without updating PID file (/usr/local/mysql/data/localhost.localdomain.pid).[失败]
[root@localhost mysql]# chmod 777 /var/lib/mysql/
[root@localhost mysql]# chmod 777 /var/lib/mysql/
[root@localhost mysql]#
[root@localhost mysql]# service mysqld start
Starting MySQL..[ 确定 ]
[root@localhost mysql]#
折腾了一天终于搞定~!