您好,登錄后才能下訂單哦!
mkdir /tools && cd /tools
mysql下載
https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.22.tar.gz
下載boost源碼
https://jaist.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz
groupadd mysql
useradd -s /sbin/nologin -M -g mysql mysql
yum install make gcc gcc-c++ cmake bison-devel ncurses-devel git perl-Module-Install.noarch libaio-devel -y
cd /tools && tar xf /tools/mysql-5.7.22.tar.gz
mv /tools/boost_1_59_0.tar.gz /tools/mysql-5.7.22
mkdir /tools/mysql-5.7.22/debug
mkdir /application/mysql
mkdir /data/3306
cd /tools/mysql-5.7.22/debug
cmake .. -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=RelWithDebInfo -DINSTALL_LAYOUT=STANDALONE -DENABLE_DTRACE=OFF -DWITH_EMBEDDED_SERVER=OFF -DWITH_INNODB_MEMCACHED=ON -DWITH_SSL=bundled -DWITH_ZLIB=system -DWITH_PAM=on -DCMAKE_INSTALL_PREFIX=/application/mysql -DINSTALL_PLUGINDIR=/application/mysql/lib/plugin -DMYSQL_DATADIR=/data/3306/data -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR=/data/3306/mysqld.sock -DSYSTEMD_PID_DIR=/data/3306 -DMYSQL_USER=mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EDITLINE=bundled -DFEATURE_SET=community -DCOMPILATION_COMMENT="MySQL Server (GPL)" -DWITH_DEBUG=OFF -DWITH_BOOST=..
make -j grep processor /proc/cpuinfo|wc -l
make install
cp /application/mysql/support-files/mysql.server /etc/init.d/mysql
vim /etc/my.cnf
[mysqld]
user = mysql
port = 3306
socket = /data/3306/mysql.sock
basedir = /application/mysql
datadir = /data/3306/data
chown -R mysql.mysql /data/3306
/application/mysql/bin/mysqld --defaults-file=/etc/my.cnf --initialize-insecure
/etc/init.d/mysql start
echo "set password=password('123456');"| mysql -S /data/3306/mysql.sock
mysql -uroot -p123456 -S /data/3306/mysql.sock
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。