CentOS7.4 x64环境Percona-Server-5.6安装

Posted 一片相思林

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS7.4 x64环境Percona-Server-5.6安装相关的知识,希望对你有一定的参考价值。

CentOS7.4 x64环境Percona-Server-5.6安装

下载mysql

$ cd /usr/local/src/

$ wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.38-83.0/binary/redhat/7/x86_64/Percona-Server-shared-56-5.6.38-rel83.0.el7.x86_64.rpm

$ wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.38-83.0/binary/redhat/7/x86_64/Percona-Server-client-56-5.6.38-rel83.0.el7.x86_64.rpm

$ wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.38-83.0/binary/redhat/7/x86_64/Percona-Server-server-56-5.6.38-rel83.0.el7.x86_64.rpm

安装MySQL

$ yum -y localinstall Percona-Server-shared-56-5.6.38-rel83.0.el7.x86_64.rpm
$ yum -y localinstall Percona-Server-client-56-5.6.38-rel83.0.el7.x86_64.rpm
$ yum -y localinstall Percona-Server-server-56-5.6.38-rel83.0.el7.x86_64.rpm

备份my.cnf
$ cp /etc/my.cnf /etc/my.cnf.bak

调整my.cnf参数(64G内存)

$ vi /etc/my.cnf

innodb_buffer_pool_size = 40960M
max_connections=10000
table_open_cache=8192
max_allowed_packet=20M
key_buffer_size = 1024M
sort_buffer_size = 32M
read_buffer_size = 32M
join_buffer_size = 32M

启动MySQL服务

$ service mysqld start

登录mysql设置密码

$ mysql

mysql> set password for ‘root‘@‘localhost‘=password(‘123456‘);
mysql> set password for ‘root‘@‘127.0.0.1‘=password(‘123456‘);
mysql> delete from mysql.user where password=‘‘;
mysql> GRANT SELECT ON . TO ‘readonly‘@‘192.168‘ IDENTIFIED BY ‘readonly‘ WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> quit

主从配置

参考文章:
CentOS7,MySQL主从配置和读写分离(MySQL主从、MySQL读写分离、MySQL分布式、数据库读写分离、主从配置)
http://blog.csdn.net/envon123/article/details/76615059

以上是关于CentOS7.4 x64环境Percona-Server-5.6安装的主要内容,如果未能解决你的问题,请参考以下文章

CentOS静默安装Oracle 11gR2(x64)

x64汇编第一讲,Vs系列配置x64环境与x86环境

halcon环境变量怎么设置x64

新装系统(CentOS7.4)环境初始化配置笔记

从Windows迁移SQL Server到Linux

Centos7.4配置虚拟环境