您好,欢迎访问一九零五行业门户网

CentOS 6.3下MySQL 5.6源码安装

linux操作系统:centos 6.3 1:下载:当前mysql版本到了5.6.10 下载地址:http://dev.mysql.com/downloads/mysql/5.6.html#downl
linux操作系统:centos 6.3
1:下载:当前mysql版本到了5.6.10
下载地址:
选择“source code”
在此之前最好注册一个oracle账号
2:必要软件包
yum -y install  gcc gcc-c++ gcc-g77 autoconf automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* make cmake
3:编译安装
[root@server182 ~]# groupadd mysql
[root@server182 ~]# useradd -r -g mysql mysql
[root@server182 ~]# tar -zxvf mysql-5.6.10.tar.gz
[root@server182 ~]# cd mysql-5.6.10
[root@server182 mysql-5.6.10]# cmake .
[root@server182 mysql-5.6.10]# make && make install
-------------------------默认情况下是安装在/usr/local/mysql
[root@server182 ~]# chown -r mysql.mysql /usr/local/mysql
[root@server182 ~]# cd /usr/local/mysql/scripts
[root@server182 ~]# ./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
[root@server182 ~]# cd /usr/local/mysql/support-files
[root@server182 support-files]# cp mysql.server /etc/rc.d/init.d/mysql
[root@server182 support-files]# cp my-default.cnf /etc/my.cnf
[root@server182 ~]# chkconfig -add mysql
[root@server182 ~]# chkconfig mysql on
[root@server182 ~]# service mysql start
starting mysql success!
[root@server182 support-files]# mysql
welcome to the mysql monitor.  commands end with ; or \g.
your mysql connection id is 1
server version: 5.6.10 source distribution
copyright (c) 2000, 2013, oracle and/or its affiliates. all rights reserved.
oracle is a registered trademark of oracle corporation and/or its
affiliates. other names may be trademarks of their respective
owners.
type 'help;' or '\h' for help. type '\c' to clear the current input statement.
mysql>
mysql> status;
--------------
mysql  ver 14.14 distrib 5.6.10, for linux (i686) using  editline wrapper
connection id:  1
current database:
current user:  root@localhost
ssl:    not in use
current pager:  stdout
using outfile:  ''
using delimiter:  ;
server version:  5.6.10 source distribution
protocol version:  10
connection:  localhost via unix socket
server characterset:  utf8
db    characterset:  utf8
client characterset:  utf8
conn.  characterset:  utf8
unix socket:  /tmp/mysql.sock
uptime:    5 min 45 sec
threads: 1  questions: 5  slow queries: 0  opens: 70  flush tables: 1  open tables: 63  queries per second avg: 0.014
--------------
mysql>
安装完毕。

其它类似信息

推荐信息