CentOS 6.5 mysql源码安装1.0版

前端之家收集整理的这篇文章主要介绍了CentOS 6.5 mysql源码安装1.0版前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

猜你在找的CentOS相关文章