在Centos7上安装Percona 5.7

版权声明:声明:本博客欢迎转发,但请保留原作者信息!本站文章皆基于公开来源信息,仅代表作者个人观点 https://blog.csdn.net/wylfengyujiancheng/article/details/51334875
作者:【吴业亮】云计算开发工程师
博客: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

1
2、安装Percona 5.7

yum install Percona-Server-server-57

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

service mysqld restart

chkconfig mysqld on

1
2
4、初始化数据库

[root@localhost Percona-db]# 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) : 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!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
注意:Percona 5.7安装完默认会产生个随机的密码,存在日志中。这个问题曾困扰我一下午。
查看方法:

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

1
5、测试

[root@localhost ~]# 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 © 2009-2016 Percona LLC and/or its affiliates
Copyright © 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

作者:二进制-程序猿
来源:CSDN
原文:https://blog.csdn.net/wylfengyujiancheng/article/details/51334875
版权声明:本文为博主原创文章,转载请附上博文链接!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值