标签:mysql
useradd -M -s /sbin/nologin mysql;
yum -y install gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake;
tar zxvf mysql-5.6.25.tar.gz ;tar zxvf cmake-3.2.3.tar.gz
cd cmake-3.2.3;
./bootstrap;
gmake;
make install ;
cd ../mysql-5.6.25;
cmake -DCMAKE_INSTALL_PREFIX=/opt/mysql/;make ;make install
chown -R mysql.mysql /opt/mysql
cd /opt/mysql/scripts
./mysql_install_db --user=mysql --basedir=/opt/mysql --datadir=/opt/mysql/data
cd /opt/mysql/support-files
cp mysql.server /etc/rc.d/init.d/mysqld
cp my-default.cnf /etc/my.cnf
chkconfig --add mysqld
chkconfig mysqld on
chkconfig --level 35 mysqld on
cat << EOF > /etc/my.cnf
[mysqld]
datadir=/opt/mysql/data
basedir=/opt/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
EOF
/etc/init.d/mysqld start
/etc/init.d/mysqld restart
本文出自 “有志者,事竟成” 博客,请务必保留此出处http://wuxinglai.blog.51cto.com/9136815/1672022
标签:mysql
原文地址:http://wuxinglai.blog.51cto.com/9136815/1672022