码迷,mamicode.com
首页 > 数据库 > 详细

mysql 5.6.25安装

时间:2015-07-08 23:01:45      阅读:440      评论:0      收藏:0      [点我收藏+]

标签: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 5.6.25安装

标签:mysql

原文地址:http://wuxinglai.blog.51cto.com/9136815/1672022

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!