zoukankan      html  css  js  c++  java
  • Linux MySQL 5.1源码安装

    安装必备的软件
    yum install ncurses-devel -y
    yum install pcre pcre-devel -y
    yum install gcc* -y
     
    解压缩
    tar -zxvf mysql-5.1.72.tar.gz 
     
     
    创建目录
    mkdir /application/mysql5.1.72/{data,tmp} -p
    chown -R mysql:mysql /application
     
     
    编译MySQL
    ./configure
    --prefix=/application/mysql5.1.72
    --with-unix-socket-path=/application/mysql5.1.72/tmp/mysql.sock
    --localstatedir=/application/mysql5.1.72/data
    --enable-assembler
    --enable-thread-safe-client
    --with-mysqld-user=mysql
    --with-big-tables
    --without-debug
    --with-pthread
    --enable-assembler
    --with-extra-charsets=complex
    --with-readline
    --with-ssl
    --with-embedded-server
    --enable-local-infile
    --with-plugins=partition,innobase
    --with-mysqld-ldflags=-all-static
    --with-client-ldflags=-all-static 
    #--with-plugin-PLUGIN
     
     
    make && make install
     
     
     
    创建软连接
    ln -s /application/mysql5.1.72/ /application/mysql
     
     
    cp support-files/my-small.cnf /etc/my.cnf
     
     
    创建mysql用户
    groupadd mysql
    useradd -g mysql mysql
    echo "oracle" |passwd --stdin mysql
     
     
    创建数据文件目录
    mkdir /application/mysql/data -p
     
    chown -R mysql:mysql /application/mysql
     
    初始化过程
    /application/mysql/bin/mysql_install_db --basedir=/application/mysql --datadir=/application/mysql/data/ --user=mysql
     
    如果没有出现错误(出现Waring可以),并且出现两个OK,说明初始化成功。
     
     
    添加/application/mysql/bin到环境变量
    export PATH=/application/mysql/bin:$PATH
     
     
     
     
     
     
  • 相关阅读:
    编译问题----宏定义一定显示未定义
    低级错误记录-程序更新后,没有显示想要的结果
    云编译的优点-普及云编译
    telecommunication communication 的区别
    学习EPC架构演进历史知识
    EOF与feof的区别
    epoll惊群问题-解决思路
    epoll多路复用机制的学习
    进程组与组长进程
    记录博客开始
  • 原文地址:https://www.cnblogs.com/liang545621/p/7518199.html
Copyright © 2011-2022 走看看