Centos 5.6 x86_64
First, you need to install the required package:
Yum install gcc-c + + gcc-g77 autoconf automake zlib * fiex * libxml * ncurses-devel libmcrypt * libtool-ltdl-devel * make cmake-y
Then add the user:
# Groupadd mysql
# Useradd-r-g mysql
Compile and install
# Tar-zxvf mysql-5.6.13.tar.gz
# Cd mysql-5.6.13
[Root @ xbz mysql-5.6.13] # cmake.
[Root @ xbz mysql-5.6.13] # make & make install
Here I am relatively simple. Of course, you can set detailed compilation parameters. By default, it is installed in/usr/local/mysql.
[Root @ xbz ~] # Chown-R mysql. mysql/usr/local/mysql
[Root @ xbz ~] # Cd/usr/local/mysql/scripts
[Root @ xbz ~] #./Mysql_install_db -- user = mysql -- basedir =/usr/local/mysql -- datadir =/usr/local/mysql/data
[Root @ xbz ~] # Cd/usr/local/mysql/support-files
[Root @ xbz support-files] # cp mysql. server/etc/rc. d/init. d/mysql
[Root @ xbz support-files] # cp my-default.cnf/etc/my. cnf
[Root @ xbz support-files] # vim/etc/my. cnf [mysql]
Socket =/tmp/mysql. sock
# Chkconfig-add mysql
# Chkconfig mysql on
# Service mysql start # mysql or you have set the password mysql-uroot-p)
This article is from the "xbzy" blog, please be sure to keep this source http://3861088.blog.51cto.com/3851088/1297702