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
    
    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
  • 相关阅读:
    css知识小结(更新中)
    vim的简易操作
    shell语言学习(更新中)
    An Introduction to C & GUI Programming -----Simon Long 学习笔记 1
    fread,fwrite(二)
    fread,fwrite(一)
    printf 打印颜色
    容斥原理及证明
    字典的认识和使用 day05
    列表和元祖的使用 day 04
  • 原文地址:https://www.cnblogs.com/lexus/p/2368495.html
Copyright © 2011-2022 走看看