温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

centos7怎么安装percona Server服务器

发布时间:2021-08-13 20:48:27 来源:亿速云 阅读:115 作者:chen 栏目:系统运维

这篇文章主要讲解了“centos7怎么安装percona  Server服务器”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“centos7怎么安装percona  Server服务器”吧!

Percona Server简介

Percona ServerMySQL的改进版本,使用 XtraDB 存储引擎,在功能和性能上较 MySQL 有着很显著的提升,如提升了在高负载情况下的 InnoDB 的性能,为 DBA 提供了一些非常有用的性能诊断工具,另外有更多的参数和命令来控制服务器行为。

Percona Server安装

平台说明:

centos 7 ,Percona Server 5.6

执行用户 root , 安装使用用户 centralight

1.更新yum

yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm

2.安装

yum install Percona-Server-client-56 Percona-Server-server-56

安装如果有冲突,之前已经安装过mysql,则需要卸载

rpm -qa | grep mysql
rpm -qa | grep mariadb
rpm -e [软件标识]

3.非多实例配置及启动

默认配置文件路径 /etc/my.cnf

初始化 

mysql_install_db --user=centralight --datadir=/cl/data/mysql/percona3311 

启动 

mysqld_safe --user=centralight --datadir=/cl/data/mysql --defaults-file=/cl/dist/conf/mysql/my.cnf

4.多实例配置及启动

chown -R centralight /cl/data/mysql/percona3311 

mysql_install_db --datadir=/cl/data/mysql/percona3311 --user=centralight

所有配置文件目录

默认配置文件路径 /etc/my.cnf,修改成如下

[client] 

user = root 

password = 123 

# Here follows entries for some specific programs 

[mysqld_multi] 

mysqld = /usr/bin/mysqld_safe 

mysqladmin = /usr/bin/mysqladmin 

[mysqld3311] 

socket = /var/lib/mysql/mysql3311.sock 

port = 3311 

datadir = /cl/data/mysql/percona3311 

pid-file = /var/lib/mysql/hostname.pid3311 

user = centralight 

skip-external-locking 

key_buffer_size = 16M 

max_allowed_packet = 1M 

table_open_cache = 64 

sort_buffer_size = 512K

启动

mysqld_multi --defaults-file=/etc/my.cnf --log=/cl/log/mysql/mysql.log start 3311

报告状态

mysqld_multi --defaults-file=/etc/my.cnf report 3311

5.登陆数据库修改用户及权限,并能远程连接

mysql -uroot -p -h227.0.0.1 -P3311 

mysql> use mysql; 

mysql> update user set host='%’ where host = ‘localhost’ and user=‘root’ 

mysql> flush privileges;

设置密码

mysql> UPDATE user SET Password=password("123") WHERE user='root' and host='%’; 

mysql> flush privileges;

如果不能远程连接,请关闭防火墙尝试

CentOS 7.0默认使用的是firewall作为防火墙

systemctl stop firewalld.service 

systemctl disable firewalld.service

感谢各位的阅读,以上就是“centos7怎么安装percona  Server服务器”的内容了,经过本文的学习后,相信大家对centos7怎么安装percona  Server服务器这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI