一、准備
安裝包:Percona-Server-5.6.21-70.0-r688-el6-x86_64-bundle.tar
MySQL下載地址:http://www.percona.com/doc/percona-server/5.6/
二、安裝
①首先安裝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 防火牆已經開啟的端口
如果安裝不成功,過來打我。☺☺☺☺
版權聲明:本文為博主原創文章,允許轉載,但轉載必須標明出處。