mysql8.0編譯安裝


#下載依賴
yum install -y  ncurses ncurses-devel cmake bison bison-devel openssl openssl-libs openssl-devel  gcc gcc-c++ gcc-g77 make 

#創建mysql賬號與存儲目錄
useradd  -s /sbin/nologin  -M  mysql
mkdir  /data/mysqldata -p
chown -R mysql.mysql  /data/mysqldata

#安裝boost 
wget http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.gz
tar xf boost_1_60_0.tar.gz  -C /usr/local/
mv /usr/local/boost_1_60_0  /usr/local/boost

#下載mysql與安裝mysql
wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-8.0.11.tar.gz
tar xf mysql-boost-8.0.0-dmr.tar.gz 
cd mysql-8.0.0-dmr/

cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/data/mysqldata/data \
-DSYSCONFDIR=/etc \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_MEMORY_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DMYSQL_UNIX_ADDR=/data/mysqldata/mysql.sock \
-DMYSQL_TCP_PORT=3306 \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DEXTRA_CHARSETS=all \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_BOOST=/usr/local/boost

make && make install

  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM