• [转]mysql源代码安装


    (2011-07-21 14:24:59)
     
    mysql5.1mysql生产环境下安装
    cp support-files/mysql.server /etc/rc.d/init.d/mysqld
    chmod 700 /etc/rc.d/init.d/mysqld 
    chkconfig --add mysqld
    /etc/rc.d/init.d/mysqld start

    groupadd mysql
    useradd -g mysql mysql
    su - mysql
    ./configure --prefix=/usr/local/mysql --without-debug --without-bench --enable-thread-safe-client --enable-assembler --enable-profiling --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-charset=latin1 --with-extra-charset=utf8,gbk --with-innodb --with-csv-storage-engine --with-federated-storage-engine --with-mysqld-user=mysql --without-embedded-server --with-server-suffix=-community --with-unix-socket-path=/usr/local/mysql/run/mysql.sock
    make -j 8  
    make install
     
    cd /usr/local/mysql
    su - root
    cp mysql/share/mysql/my-medium.cnf /etc/my.cnf
    chown -R mysql:mysql /etc/my.cnf
    vi /etc/my.cnf
    basedir = /usr/local/mysql
    datadir = /usr/local/mysql/data
    socket = /usr/local/mysql/run/mysql.sock
    log-error =/usr/local/mysql/log/alert.log
    log_slow_queries = /usr/local/mysql/log/slow.log
     
    mkdir log run data tmp
    su - mysql
    ./bin/mysql_install_db --basedir=/usr/local/mysql  --datadir=/usr/local/mysql/data --user=mysql
     
    ./bin/mysqld_safe &
    /usr/local/mysql/bin/mysqladmin -u root -h localhost password '123456'
    ./share/mysql/mysql.server stop/start
  • 相关阅读:
    centos编辑文件显示行号
    16.1
    [整理]正睿划水记
    [题解]UVA1519 Dictionary Size
    [题解]CF323C Two permutations
    [题解]CF1527D MEX Tree
    P2216 [HAOI2007]理想的正方形
    CF858D Polycarp's phone book
    ABC214F substrings
    每天一点小知识-20210810
  • 原文地址:https://www.cnblogs.com/slips/p/3585039.html
Copyright © 2020-2023  润新知