centos6.6下編譯安裝mysql5.6之后啟動失敗:Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).


今天在編譯安裝mysql5.6時候出現Starting MySQL... ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).,當時就心碎了,之前安裝時候好好的,在網上搜索幫助方法,可是沒有和我一樣的,有的說我沒有給mysqld賦權限,可是我賦予他權限了,試了一堆方法,最后心灰意冷,准備刪除mysql重新安裝,就在我執行:yum remove mysql mysql-server mysql-libs compat-mysql 時候,進度行一直再走,猛地看到了這些:

Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
No Match for argument: mysql
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Package(s) mysql available, but not installed.
No Match for argument: mysql-server
Package(s) mysql-server available, but not installed.
No Match for argument: compat-mysql
Resolving Dependencies
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.73-3.el6_5 will be erased
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-6.el6_5.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-6.el6_5.x86_64
--> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-6.el6_5.x86_64
--> Running transaction check
---> Package postfix.x86_64 2:2.6.6-6.el6_5 will be erased
--> Processing Dependency: /usr/sbin/sendmail for package: cronie-1.4.4-12.el6.x86_64
--> Running transaction check
---> Package cronie.x86_64 0:1.4.4-12.el6 will be erased
--> Processing Dependency: cronie = 1.4.4-12.el6 for package: cronie-anacron-1.4.4-12.el6.x86_64
--> Running transaction check
---> Package cronie-anacron.x86_64 0:1.4.4-12.el6 will be erased
--> Processing Dependency: /etc/cron.d for package: crontabs-1.10-33.el6.noarch
--> Processing Dependency: /etc/cron.d for package: sysstat-9.0.4-27.el6.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package crontabs.noarch 0:1.10-33.el6 will be erased
---> Package sysstat.x86_64 0:9.0.4-27.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================
Removing:
mysql-libs x86_64 5.1.73-3.el6_5 @anaconda-CentOS-201410241409.x86_64/6.6 4.0 M
Removing for dependencies:
cronie x86_64 1.4.4-12.el6 @anaconda-CentOS-201410241409.x86_64/6.6 174 k
cronie-anacron x86_64 1.4.4-12.el6 @anaconda-CentOS-201410241409.x86_64/6.6 43 k
crontabs noarch 1.10-33.el6 @anaconda-CentOS-201410241409.x86_64/6.6 2.4 k
postfix x86_64 2:2.6.6-6.el6_5 @anaconda-CentOS-201410241409.x86_64/6.6 9.7 M
sysstat x86_64 9.0.4-27.el6 @anaconda-CentOS-201410241409.x86_64/6.6 825 k

Transaction Summary
=======================================================================================================================================
Remove 6 Package(s)

Installed size: 15 M

 

 

分析出來是有舊版的mysql,我把舊版本的mysql卸載之后,運行 service mysqld start,OK,

root@localhost ~]# service mysqld start
Starting MySQL.... SUCCESS!
[root@localhost ~]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.21 Source distribution

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.04 sec)

mysql> exit
Bye

已經OK了,這是我遇到的情況,不知道大家在安裝時候有沒有遇見過。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM