时间:2021-07-01 10:21:17 帮助过:15人阅读
mysql 下载编译工具 安装编译工具 作一个软链作为全局变量 下载 Boost库 安装必要工具 编译安装mysql 编译错误需要删除 rm CMakeCache.txt 重新编译 修改配置 sudo vi /usr/local/mysql/my.conf 添加随系统启动 启动完成 wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33.tar.gz
tar -zxvf mysql-5.6.33.tar.gz
wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz
tar -zxvf cmake-2.8.5.tar.gz
cd cmake-2.8.5
./bootstrap --prefix=/usr/local/cmake
sudo gmake && sudo gmake install
ln -s /usr/local/cmake/bin/cmake /usr/bin
wget http://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz
tar -zxvf boost_1_59_0.tar.gz
mkdir /usr/local/boost
mv boost_1_59_0/* /usr/local/boost
sudo groupadd mysql
sudo useradd -g mysql mysql
cd mysql-5.6.33
yum -y install ncurses-devel
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_TCP_PORT=3306 -DMYSQL_USER=mysql -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_BOOST=/usr/local/boost
sudo make && sudo make install
mysql安装完成了 cd /usr/local/mysql/scripts/
sudo ./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
socket = /tmp/mysql.sockcd /usr/local/mysql/support-files
sudo cp mysql.server /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
sudo service mysqld start
编译安装mysql5.6
标签:file style eve base space margin socket cache 全局