• Centos 5.5 编译安装mysql 5.5.9


    下载mysql wget  http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/mysql-5.5.9.tar.gz
    创建mysql用户
    [root@xuhost opt]# useradd -g mysql mysql3307 -s /bin/nologin -d /usr/local/mysql3307
    创建数据目录
    [root@xuhost opt]# mkdir /mysqldata/dirdata/mysql3307
    [root@xuhost opt]# chown mysql.mysql -R /mysqldata/dirdata/mysql3307
    安装 cmake
    [root@xuhost opt]# wget http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
    [root@xuhost opt]# tar zxvf cmake-2.8.4.tar.gz
    [root@xuhost opt]# ./configure
    [root@xuhost opt]# cd cmake-2.8.4
    [root@xuhost cmake-2.8.4]# make install
    安装mysql 5.5.9
    [root@xuhost opt]# tar zxvf mysql-5.5.9.tar.gz
    [root@xuhostopt]# cd mysql-5.5.9
    [root@xuhost mysql-5.5.9]# cmake . -DCMAKE_INSTALL_PREFIX=/mysqldata/mysql3307/ -DMYSQL_DATADIR=/mysqldata/dirdata/mysql3307/ -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_TCP_PORT=3307 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_UNIX_ADDR=/mysqldata/dirdata/mysql3307/mysql.sock -DWITH_DEBUG=0
    [root@xuhost mysql-5.5.9]# make
    [root@xuhost mysql-5.5.9]# make install
    复制配置文件
    [root@xuhost mysql-5.5.9]# cp support-files/my-medium.cnf /etc/my.cnf
    复制启动脚本
    [root@xuhost mysql-5.5.9]# cp support-files/mysql.server /etc/init.d/mysqld
    [root@xuhost mysql-5.5.9]# chmod 755 /etc/init.d/mysqld
    初始化数据库 (进到安装目录)
    [root@xuhost mysql5.5.9]# ./scripts/mysql_install_db –user=mysql –ldata=/var/mysql
    启动数据库
    [root@xuhost mysql5.5.9]# /etc/init.d/mysqld start

    /bin/sh /mysqldata/mysql3307/bin/mysqld_safe --datadir=/mysqldata/dirdata/mysql3307 --socket=/mysqldata/dirdata/mysql3307/mysql.sock --pid-file=/mysqldata/dirdata/mysql3307/mysqld.pid --basedir=/mysqldata/mysql3307 --user=mysql3307&
    echo "/bin/sh /mysqldata/mysql3307/bin/mysqld_safe --datadir=/mysqldata/dirdata/mysql3307 --socket=/mysqldata/dirdata/mysql3307/mysql.sock --pid-file=/mysqldata/dirdata/mysql3307/mysqld.pid --basedir=/mysqldata/mysql3307 --user=mysql3307&" >> /etc/rc.local

    Myslq 5.5.9以上版本编译出现错误汇总:
    CMake Warning: The variable, 'MYSQL_USER', specified manually, was not used during the generation.
    需要把预编译里面的MYSQL_USER去掉,即可预编译成功!
  • 相关阅读:
    CSS同时选择器
    create-react-app之proxy
    mysql limit语句
    给tbody加垂直滚动条的具体思路
    MySql数据类型范围
    block、inline、inline-block
    javascript sourcemap
    session of express
    React中innerHTML的坑
    box-sizing
  • 原文地址:https://www.cnblogs.com/youlechang123/p/3819412.html
Copyright © 2020-2023  润新知