yum -y install gcc gcc-c++ gcc autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl make cmake
groupadd mysql
useradd -r -g mysql mysql
tar -zxvf mysql-5.6.10.tar.gz
cd mysql-5.6.10
cmake .
make && make install
默认情况下是安装在/usr/local/mysql
chown -R mysql.mysql /usr/local/mysql
cd /usr/local/mysql/scripts
./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
chkconfig --add mysql
chkconfig mysql on
service mysql start
Starting MySQL SUCCESS!
cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysqld
加入启动项:
chkconfig --add mysqld
chkconfig --level 345 mysqld on
源码编译安装mysql5.6
时间: 2024-11-05 17:30:53