tokudb 安装mysql_史上最简单的MySQL安装教程之Linux(CentOS6.8)下安装MySQL5.6

一、准备

安装包:Percona-Server-5.6.21-70.0-r688-el6-x86_64-bundle.tar

二、安装

①首先安装cmake

命令:yum -y install cmake

[root@localhost opt]# yum -y install cmake

②上传安装包

[root@localhost /]# cd /usr/local/src/

[root@localhost src]# mkdir mysql

[root@localhost src]# cd mysql

[root@localhost mysql]# rz

[root@localhost mysql]# ls

Percona-Server-5.6.21-70.0-r688-el6-x86_64-bundle.tar

③解压安装包

[root@localhost mysql]# tar -xvf Percona-Server-5.6.21-70.0-r688-el6-x86_64-bundle.tar

Percona-Server-56-debuginfo-5.6.21-rel70.0.el6.x86_64.rpm

Percona-Server-client-56-5.6.21-rel70.0.el6.x86_64.rpm

Percona-Server-devel-56-5.6.21-rel70.0.el6.x86_64.rpm

Percona-Server-server-56-5.6.21-rel70.0.el6.x86_64.rpm

Percona-Server-shared-56-5.6.21-rel70.0.el6.x86_64.rpm

Percona-Server-test-56-5.6.21-rel70.0.el6.x86_64.rpm

Percona-Server-tokudb-56-5.6.21-rel70.0.el6.x86_64.rpm

④安装客户端和服务端

[root@localhost mysql]# rpm -ivh Percona-Server-shared-56-5.6.21-rel70.0.el6.x86_64.rpm

warning: Percona-Server-shared-56-5.6.21-rel70.0.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY

Preparing... ########################################### [100%]

1:Percona-Server-shared-5########################################### [100%]

[root@localhost mysql]# rpm -ivh Percona-Server-client-56-5.6.21-rel70.0.el6.x86_64.rpm

warning: Percona-Server-client-56-5.6.21-rel70.0.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY

Preparing... ########################################### [100%]

1:Percona-Server-client-5########################################### [100%]

[root@localhost mysql]# rpm -ivh Percona-Server-server-56-5.6.21-rel70.0.el6.x86_64.rpm

⑤启动服务

[root@localhost mysql]# service mysql start

Starting MySQL (Percona Server).. [确定]

⑥修改root密码

[root@localhost mysql]# mysqladmin -u root password "123456"

Warning: Using a password on the command line interface can be insecure.

⑦登录成功

[root@localhost mysql]# mysql -uroot -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 3

Server version: 5.6.21-70.0 Percona Server (GPL), Release 70.0, Revision 688

Copyright (c) 2009-2014 Percona LLC and/or its affiliates

Copyright (c) 2000, 2014, 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> grant all privileges on *.* to 'root' @'%' identified by '123456';

Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

⑨防火墙打开3306端口

[root@localhost mysql]# /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT #开启防火墙

[root@localhost mysql]# /etc/rc.d/init.d/iptables save #当前规则保存,保证开机后也是开启的

iptables:将防火墙规则保存到 /etc/sysconfig/iptables: [确定]

[root@localhost mysql]# /etc/init.d/iptables status #查看iptables 防火墙已经开启的端口

如果安装不成功,过来打我。☺☺☺☺

版权声明:本文为博主原创文章,允许转载,但转载必须标明出处。

作者:Java蚂蚁

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值