zoukankan      html  css  js  c++  java
  • 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了,这是我遇到的情况,不知道大家在安装时候有没有遇见过。

  • 相关阅读:
    成为明星程序员的10个提示
    使用命令时一些快捷的方法
    mysql字符串截取
    MFGTool2批量操作
    busybox microcom Segmentation fault
    Linux 定制X86平台操作系统
    Buildroot MariaDB替代MySQL
    arcotg_udc: exports duplicate symbol imx_usb_create_charger (owned by kernel)
    create newline in Github Bio
    BusyBox ifup udhcpc后台运行
  • 原文地址:https://www.cnblogs.com/itor/p/4538715.html
Copyright © 2011-2022 走看看