• mysql部分 5.6.10源码安装


    yum install -y gcc gcc-c++ make ncurses-devel bison openssl-devel zlib-devel cmake

    tar zxvf  mysql-5.6.10.tar.gz
    cd mysql-5.6.10
    cmake -DCMAKE_INSTALL_PREFIX=/usr/local/lanmp/mysql 
    -DMYSQL_DATADIR=/usr/local/lanmp/mysql/data 
    -DMYSQL_UNIX_ADDR=/usr/local/lanmp/mysql/data/mysql.sock 
    -DWITH_MYISAM_STORAGE_ENGINE=1 
    -DDEFAULT_CHARSET=utf8 
    -DDEFAULT_COLLATION=utf8_general_ci 
    -DEXTRA_CHARSETS=all
    make
    make install
     
    useradd -u 27  -M -d /usr/local/lnmp/mysql   mysql
    groupmod -g 27 mysql                                             //修改gid
    cd /usr/local/lanmp/mysql/
    chown -R mysql.mysql .
    cd support-files/
     
    cp my-default.cnf /etc/my.cnf
    vim /etc/my.cnf
    文件内容 一下几行的#去掉并且修改
     basedir = /usr/local/lanmp/mysql datadir = /usr/local/lanmp/mysql/data port = 3306 server_id = 1 socket = /usr/local/lanmp/mysql/data/mysql.sock
    cd /usr/local/lanmp/mysql/
    scripts/mysql_install_db --user=mysql --basedir=/usr/local/lanmp/mysql   
    --datadir=/usr/local/lanmp/mysql/data/      --defaults-file=/etc/my.cnf
     
    cd support-files/
    cp mysql.server /etc/init.d/mysqld
     
    /etc/init.d/mysqld start
    chkconfig mysqld on
    vim ~/.bash_profile
    修改环境变量
    PATH=$PATH:$HOME:/bin:/usr/local/lanmp/mysql/bin/
    source ~/.bash_profile
    输入mysql命令,运行成功 ,ok
    mysql_secure_installation                       //修改mysql密码
    mysql -uroot -p                                            //登录mysql成功
  • 相关阅读:
    1006: [HNOI2008]神奇的国度
    1003: [ZJOI2006]物流运输trans
    Task 6.2冲刺会议六 /2015-5-19
    Task 6.2冲刺会议五 /2015-5-18
    Task 6.2冲刺会议四 /2015-5-17
    Task 6.3 场景调研
    Task 8 找水王
    Task 6.2站立会议三
    Task 6.2站立会议二
    Task 6.2站立会议一
  • 原文地址:https://www.cnblogs.com/Seven-Wang/p/4451577.html
Copyright © 2020-2023  润新知