• 编译安装mysql5.7.20


    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && 
    yum clean all &&
    yum install -y wget gcc gcc-c++ automake autoconf make cmake bison-devel ncurses-devel libaio-devel &&
    mkdir /server/tools /application -p &&
    cd /server/tools &&
    useradd mysql -s /sbin/nologin -M && 
    wget https://www.chenleilei.net/soft/mysql-boost-5.7.20.tar.gz &&
    tar xf mysql-boost-5.7.20.tar.gz &&
    rm -f mysql-boost-5.7.20.tar.gz &&
    cd mysql-5.7.20 &&
    cmake . -DCMAKE_INSTALL_PREFIX=/application/mysql-5.7.20 
    -DMYSQL_DATADIR=/application/mysql-5.7.20/data 
    -DMYSQL_UNIX_ADDR=/application/mysql-5.7.20/tmp/mysql.sock 
    -DDOWNLOAD_BOOST=1 -DWITH_BOOST=./boost 
    -DSYSCONFDIR=/etc -DDEFAULT_CHARSET=utf8mb4 
    -DDEFAULT_COLLATION=utf8mb4_general_ci 
    -DWITH_EXTRA_CHARSETS=all 
    -DWITH_INNOBASE_STORAGE_ENGINE=1 
    -DWITH_FEDERATED_STORAGE_ENGINE=1 
    -DWITH_BLACKHOLE_STORAGE_ENGINE=1 
    -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 
    -DWITH_MYISAM_STORAGE_ENGINE=1 
    -DWITH_ZLIB=bundled -DWITH_SSL=bundled 
    -DENABLED_LOCAL_INFILE=1 
    -DWITH_EMBEDDED_SERVER=1 
    -DENABLE_DOWNLOADS=1 
    -DWITH_DEBUG=0 &&
    make && make install &&
    chown -R mysql.mysql /application/mysql-5.7.20 &&
    /application/mysql-5.7.20/bin/mysqld --initialize-insecure --user=mysql --basedir=/application/mysql-5.7.20 --datadir=/application/mysql-5.7.20/data
    echo -e "[mysqld] 
    basedir=/application/mysql 
    datadir=/application/mysql-5.7.20/data 
    socket=/tmp/mysql.sock 
    log_error=/var/log/mysql.log 
    user=mysql 
    port=3306 
    [client] 
    socket=/tmp/mysql.sock" >/etc/my.cnf
    rm -rf /server/tools/mysql-5.7.20 && 
    rm -rf /var/cache/yum/*
    echo 'PATH=/application/mysql/bin/:$PATH' >>/etc/profile && 
    source /etc/profile && 
    cp /application/mysql-5.7.20/support-files/mysql.server /etc/init.d/mysqld && 
    mkdir  /application/mysql-5.7.20/tmp -p && 
    ln -s /application/mysql-5.7.20 /application/mysql && 
    /etc/init.d/mysqld start
    

    微信赞赏

    支付宝赞赏

  • 相关阅读:
    Warning This file includes at least one deprecated or antiquated header
    springdata spring 的nosql的orm框架学习
    C#中this关键字的用法
    java 的svn客户端调用示例
    jsoncpp longlong 类型的扩展
    HTML中的a标签实现点击下载
    android实现自动安装
    键值对 纵一苇之所如
    Js 日期选择,可以的一个页面中重复使用本JS日历,兼容IE及火狐等主流浏览器,而且界面简洁、美观,操作体验也不错。 纵一苇之所如
    C# 判断文件有没占用 纵一苇之所如
  • 原文地址:https://www.cnblogs.com/superlinux/p/12596905.html
Copyright © 2020-2023  润新知