在Centos7上安装Percona 5.7

作者:【吴业亮】云计算开发工程师

博客:http://blog.csdn.net/wylfengyujiancheng

在openstack集群非常大的情况下mysql5.5的最大连接数就成了问题(1040,Too many connections),dashboard界面操作经常因为连接不 上数据库报各种错误。经过试验将最大连接数改为2000,超时时间改为300s,问题还依旧。

针对这种问题,Percona 推出了新版本Percona 5.7.10-1

具体参见

https://www.percona.com/doc/percona-server/5.7/reliability/log_connection_error.html

下面具体介绍Percona 5.7.10-1安装方法

1、安装数据库源

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

2、安装Percona 5.7

# yum install Percona-Server-server-57

3、启动数据库并设置开机启动

# service mysqld restart
# chkconfig mysqld on

4、初始化数据库

[[email protected] ~]# mysql_secure_installation 

Securing the MySQL server deployment.

Enter password for user root: 

The existing password for the user account root has expired. Please set a new password.

New password: 

Re-enter new password:
The ‘validate_password‘ plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.

Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : y

New password: 

Re-enter new password: 

Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : n

New password: 

Re-enter new password: 

Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.

Normally, root should only be allowed to connect from
‘localhost‘. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.

By default, MySQL comes with a database named ‘test‘ that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.

Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.

All done! 

注意:Percona 5.7安装完默认会产生个随机的密码,存在日志中。这个问题曾困扰我一下午。

查看方法:

# cat /var/log/mysqld.log  | grep "A temporary password" | awk -F " " ‘{print$11}‘

5、测试

[[email protected] ~]# mysql -uroot -pChangeme_123
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.7.11-4 Percona Server (GPL), Release 4, Revision 5c940e1

Copyright (c) 2009-2016 Percona LLC and/or its affiliates
Copyright (c) 2000, 2016, 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>
mysql> 

参考:

https://www.percona.com

时间: 2024-11-15 00:39:26

在Centos7上安装Percona 5.7的相关文章

在 CentOS7 上安装 MySQL5.7

在 CentOS7 上安装 MySQL5.7 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中:cd /usr/local/ 3 创建目录 /usr/local/tools,如果有则忽略: mkdir -p tools 4 创建 /usr/local/mysql 目录,如果已存在则忽略:mkdir -p mysql 5 进入到目录 /usr/local/tools 中:cd tools/ 6 查看系统中是否已安装 MySQL 服务:

在 CentOS7 上安装 zookeeper-3.4.9 服务

在 CentOS7 上安装 zookeeper-3.4.9 服务 1.创建 /usr/local/services/zookeeper 文件夹: mkdir -p /usr/local/services/zookeeper 2.进入到 /usr/local/services/zookeeper 目录中: cd /usr/local/services/zookeeper 3.下载 zookeeper-3.4.9.tar.gz: wget https://mirrors.tuna.tsinghua.

CentOS7上安装稻壳CMS

CentOS7上安装稻壳CMS 1, 安装用途 为了给某公司建设一个小型网站,租用了一个阿里云ECS服务器,最基础的硬件配置,因此选择了CentOS7操作系统. 稻壳CMS(docCMS)源于深喉咙CMS,使用广泛,配置简单,因此采用其作为建站模板. 2,CentOS7环境安装 阿里云ECS中的CentOS7操作系统属于“裸”操作系统,没有配置基础的Web应用环境.为和稻壳CMS匹配,需安装配置的软件有: ²        Apache服务器Httpd ²        防火墙IPTables

CentOS7 上安装 Zookeeper-3.4.9 服务

在 CentOS7 上安装 zookeeper-3.4.9 服务 1.创建 /usr/local/services/zookeeper 文件夹:    mkdir -p /usr/local/services/zookeeper 2.进入到 /usr/local/services/zookeeper 目录中:    cd /usr/local/services/zookeeper 3.下载 zookeeper-3.4.9.tar.gz:    wget https://mirrors.tuna.

CentOS7上安装、配置、监控RabbitMQ

CentOS7上安装.配置.监控RabbitMQ RabbitMQ是流行的开源消息队列系统,是AMQP(Advanced Message Queuing Protocol高级消息队列协议)的标准实现,用erlang语言开发.RabbitMQ据说具有良好的性能和时效性,同时还能够非常好的支持集群和负 载部署,非常适合在较大规模的分布式系统中使用,具体特性还在验证中,待检验.由于项目需要,安装并配置了RabbitMQ,服务器操作系统是CentOS7. 环境:CentOS7.2 步骤 一.安装Erla

(转)在 CentOS7 上安装 MongoDB

在 CentOS7 上安装 MongoDB 1 通过 SecureCRT 连接至 CentOS7 服务器: 2 进入到 /usr/local/ 目录: cd /usr/local 3 在当前目录下创建 tools 目录: mkdir -p tools 4 进入到 tools 目录中: cd tools 5 下载与 CentOS 系统匹配的 mongodb-linux-x86_64-rhel70-3.2.4.tgz 文件: wget https://fastdl.mongodb.org/linux

CentOS7上安装POCO

POCO是什么? 看官网说明: Modern, powerful open source C++ class libraries and frameworks for building network- and internet-based applications that run on desktop, server, mobile and embedded systems. 下载地址 强烈建议,唯一下载地址就是官方网站,不要图省事在某些国内站点下载.地址是:(很可惜,这个残疾的网站上发博客

一次在CentOS7上安装部署Zabbix3.0版本及快速进行基本配置的实例

Zabbix3.0的安装.部署.配置,必须基于LAMP环境或是是LNMP环境. 关于LAMP环境的简单快速搭建,见博客:http://afterdawn.blog.51cto.com/7503144/1923139 注意:以下步骤都是在LAMP配置之后进行的. 本文不会再对zabbix-server和zabbix-agent理论知识再进行介绍,建议看完http://afterdawn.blog.51cto.com/7503144/1922502再进行zabbix实战. Zabbix3.0对软硬件

CentOS7上安装并配置KVM,以及通过KVM安装CentOS系统

笔记内容:CentOS7上安装并配置KVM,以及通过KVM安装CentOS系统笔记日期:2018-03-07 28.5 Centos7上安装KVM 28.6 配置网卡 28.7 创建虚拟机安装CentOS7 28.8 虚拟机管理 Centos7上安装KVM 首先我们需要一台配置较高的CentOS7虚拟机,当然用物理机也可以,我这里用的是虚拟机,配置如下: 硬盘需要新增一个,其中的新硬盘用于在KVM里安装操作系统时需要用到,内存的大小最好有4个G,最低2个G,因为我这里物理机的内存有16G所以就给