首页 > 数据库技术 > 详细

mysql 5.5.32 源码 cmake 编译 安装

时间:2018-04-04 23:11:18      阅读:276      评论:0      收藏:0      [点我收藏+]
  • cmake工具安装
    yum install cmake -y
    依赖包 yum install ncurses-devel -y
  • 开始安装mysql
    创建用户和组
    groupadd mysql
    useradd mysql -s /sbin/nologin -M -g mysql
  • tar zxf mysql-5.5.32.tar.gz
    cd mysql-5.5.32
    cmake . -DCMAKE_INSTALL_PREFIX=/application/mysql-5.5.32 \
    -DMYSQL_DATADIR=/application/mysql-5.5.32/data \
    -DMYSQL_UNIX_ADDR=/application/mysql-5.5.32/tmp/mysql.sock \
    -DDEFAULT_CHARSET=utf8 \
    -DDEFAULT_COLLATION=utf8_general_ci \
    -DEXTRA_CHARSETS=gbk,gb2312,utf8,ascii \
    -DENABLED_LOCAL_INFILE=ON \
    -DWITH_INNOBASE_STORAGE_ENGINE=1 \
    -DWITH_FEDERATED_STORAGE_ENGINE=1 \
    -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
    -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
    -DWITHOUT_PARTITION_STORAGE_ENGINE=1 \
    -DWITH_FAST_MUTEXES=1 \
    -DWITH_ZLIB=bundled \
    -DENABLED_LOCAL_INFILE=1 \
    -DWITH_READLINE=1 \
    -DWITH_EMBEDDED_SERVER=1 \
    -DWITH_DEBUG=0

  • make && make install
  • ln -s /application/mysql-5.5.32/ /application/mysql
  • echo ‘export PATH=/application/mysql/bin:$PATH‘ >> /etc/profile
  • source /etc/profile
  • cp /application/mysql/support-files/my-small.cnf /etc/my.cnf
  • chown -R mysql.mysql /application/mysql/data/
  • chown -R 1777 /tmp/
  • cd /application/mysql/scripts/
  • chmod +x mysql_install_db
  • ./mysql_install_db --basedir=/application/mysql/ --datadir=/application/mysql/data/ --user=mysql
  • cp support-files/mysql.server /etc/init.d/mysqld
  • chmod +x /etc/init.d/mysqld
  • netstat -lntup|grep 3306
  • mysql
  • mysql 5.5.32 源码 cmake 编译 安装

    原文:http://blog.51cto.com/20170401/2094872

    (0)
    (0)
       
    举报
    评论 一句话评论(0
    关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
    © 2014 bubuko.com 版权所有
    打开技术之扣,分享程序人生!