centos + mysql 安装 时候:Starting MySQL. ERROR! Manager of pid-file quit without updating file.

博客已经搬家,请访问如下地址:http://www.czhphp.com

下载:wget http://blog.s135.com/soft/linux/nginx_php/mysql/mysql-5.1.33.zip

安装:

       unzip mysql-5.1.33.zip

       cd mysql-5.1.33.zip

      ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=innobase   
      make
      make install
      useradd mysql -d /data/mysql -s/sbin/nologin
      /usr/local/mysql/bin/mysql_install_db--user=mysql
     cd /usr/local/mysql
     chown -R root:mysql .
     mkdir -p /data/mysql/data
     chown -R mysql /data/mysql/data
     cp share/mysql/my-huge.cnf /etc/my.cnf
     cp share/mysql/mysql.server/etc/rc.d/init.d/mysqld
     chmod 755 /etc/rc.d/init.d/mysqld
     chkconfig --add mysql

     service mysqld start

 当重新启动时候总 报以下错误:

   ERROR! MySQL manager or server PID file could not be found!

   Starting MySQL. ERROR! Manager of pid-file quit without updating file.

解决办法:

   MySQL编译安装,初始化数据库的时候出现:
   unknown option '--skip-federated' 错误。

   #vi /etc/my.cnf
   #skip-federated 将此行注释掉即可。或者编译的时候加上如下参数:--with-plugins=all

   如果还是不行的话那么就是因为您在配置的时候没有添加datadir,

  #vi /etc/my.cnf

    添加以下语句:

    [mysqld]
    port            = 3306
    socket          = /tmp/mysql.sock
    datadir = /usr/local/mysql/data
    datadir是新加的

博客已经搬家,请访问如下地址:http://www.czhphp.com

posted @ 2010-04-25 18:53  曹振华  阅读(3793)  评论(0编辑  收藏  举报