Install Percona offline

foreword

The installation is relatively simple, here is a simple record.

version difference

insert image description here

1. Install Percona offline

Download percona official website
to download the corresponding version you need
insert image description here

insert image description here
jemalloc-3.6.0-1.el7.x86_64.rpm needs to be downloaded separately

Install Percona
Go to the RPM installation file directory and execute the following script

yum localinstall *.rpm

insert image description here
insert image description here

Modify the percona configuration file

vim /etc/percona-server.conf.d/mysqld.cnf

[mysqld]
character_set_server = utf8
bind-address = 0.0.0.0
#跳过DNS解析
skip-name-resolve

insert image description here

Manage MySQL service

systemctl start mysqld
systemctl stop mysqld
systemctl status mysqld
systemctl restart mysqld

insert image description here

Prohibit starting MySQL on boot

chkconfig mysqld off

In a pxc cluster, it is important to disable booting

Because if a node in the cluster is down, after the system restarts, the downtime node will randomly synchronize data with one of the other nodes in the cluster. If the node downtime is too long, too much data needs to be synchronized, too much When the data needs to be synchronized, the pxc cluster will limit other write operations until all the data is written.

After a node in the pxc cluster is down for a long time, the correct approach:

Copy data files from other nodes to the node that is down, and then start the database, so that the data that needs to be synchronized will be much less, and will not cause long-term speed limit.

View MySQL initial password

cat /var/log/mysqld.log | grep "A temporary password"

insert image description here
Change MySQL password

mysql_secure_installation

After entering the default password above, enter a new password with uppercase and lowercase special symbols data
insert image description here
Create a remote administrator account

mysql -u root -p

after login

CREATE USER 'admin'@'%' IDENTIFIED BY 'Abc_123456';
GRANT all privileges ON *.* TO 'admin'@'%';
FLUSH PRIVILEGES;

Guess you like

Origin blog.csdn.net/qq_37432174/article/details/130550957