首页 > 代码库 > linux mysql源码安装1.0版
linux 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
本文出自 “每天进步一点点” 博客,请务必保留此出处http://zuoshou.blog.51cto.com/2579903/1879698
linux mysql源码安装1.0版