zoukankan      html  css  js  c++  java
  • [转]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
  • 相关阅读:
    Flink架构、原理与部署测试
    EntityFramework 简单入个门
    Gdb远程调试Linux内核遇到的Bug
    掌握jQuery插件开发
    两分钟实现安全完备的登录模块
    SQL Server 手把手教你使用profile进行性能监控
    Paxos 实现日志复制同步
    作用域是什么
    Consul 服务注册与服务发现
    C语言之预处理
  • 原文地址:https://www.cnblogs.com/slips/p/3585039.html
Copyright © 2011-2022 走看看