zoukankan      html  css  js  c++  java
  • 在centos下编译安装 mysql

    yum install gcc
    yum install gcc-c++
    
    groupadd mysql
    useradd --shell /sbin/nologin -g mysql mysql
    tar zxvf mysql-5.1.51.tar.gz
    cd mysql-5.1.51
    
    ./configure --prefix=/usr/local/mysql \
                --localstatedir=/usr/local/mysql/data \
                --with-charset=utf8 \
                --with-collation=utf8_general_ci \
                --with-extra-charsets=gb2312,gbk \
                --with-plugins=max-no-ndb \
                --with-unix-socket-path=/tmp/mysql.sock \
                --enable-local-infile \
                --enable-assembler \
                --with-client-ldflags=-all-static \
                --with-mysqld-ldflags=-all-static \
                --enable-thread-safe-client
    
    yum search libtool
    yum install libtool*
    
     autoreconf --force --install
    
        libtoolize --automake --force
    
        automake --force --add-missing
    
     make
    make install
    
    cp support-files/my-medium.cnf /etc/my.cnf
    cp support-files/mysql.server /etc/init.d/mysql
    chmod u+x /etc/init.d/mysql
    
    cd /usr/local/mysql
    bin/mysql_install_db --user=mysql
    chown -R root  .
    chown -R mysql data
    chgrp -R mysql .
    
    chkconfig --add mysql
    chkconfig --level 345 mysql on
    bin/mysqld_safe --user=mysql &
    service mysql restart
    
    ln -s /usr/local/mysql/bin/mysql /sbin/mysql
    ln -s /usr/local/mysql/bin/mysqladmin /sbin/mysqladmin
    mysqladmin -uroot password "yourpassword"
    
    reference:
    http://www.sqlstudy.com/article/mysql-compile-install-under-linux-centos-5.html

    http://www.sqlstudy.com/article/mysql-compile-install-under-linux-centos-5.html
  • 相关阅读:
    vim常用命令
    转:CRF++总结1
    转:CRF++总结2
    并查集算法程序
    CRF++使用小结(转)
    并查集算法程序
    C#winform 画图
    转:字符识别
    转:A Survey On Relation Extraction
    转:生产计划问题
  • 原文地址:https://www.cnblogs.com/lexus/p/2368614.html
Copyright © 2011-2022 走看看