foreword
The installation is relatively simple, here is a simple record.
version difference
1. Install Percona offline
Download percona official website
to download the corresponding version you need
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
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
Manage MySQL service
systemctl start mysqld
systemctl stop mysqld
systemctl status mysqld
systemctl restart mysqld
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"
Change MySQL password
mysql_secure_installation
After entering the default password above, enter a new password with uppercase and lowercase special symbols data
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;