rpm -qa | grep MysqL
yum -y install make gcc-c++ cmake bison-devel ncurses-devel
cd ..
tar xf MysqL-5.6.29.tar.gz
cd MysqL-5.6.29
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/MysqL \
-DMysqL_DATADIR=/usr/local/MysqL/data \
-DSYSCONFDIR=/etc \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_MEMORY_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DMysqL_UNIX_ADDR=/var/lib/MysqL/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
make
make install
groupadd MysqL
useradd -g MysqL -s /sbin/nologin -M MysqL
chown -R MysqL:MysqL /usr/local/MysqL
cd /usr/local/MysqL
scripts/MysqL_install_db --basedir=/usr/local/MysqL --datadir=/usr/local/MysqL/data --user=MysqL
cp support-files/MysqL.server /etc/init.d/MysqL
chkconfig MysqL on
cd /etc
mv my.cnf my.cnf.bak
service MysqL start
vim /etc/profile
PATH=/usr/local/MysqL/bin:$PATH
export PATH
source /etc/profile
MysqL -uroot
原文链接:https://www.f2er.com/centos/379580.html