5.安全加固
连接mysql:mysql -uroot -p -S /data/mysql/mysql3306/tmp/mysql.sock
delete from mysql.user where user!='root' or host!='localhost';
truncate table mysql.db;
drop database test;
进行授权,这里用户名密码是my.cnf里定义的用户名sst 密码dongzheng
GRANT ALL PRIVILEGES ON *.* TO 'sst'@'%' identified by 'dongzheng';
use mysql;
UPDATE user SET password=PASSWORD('123456') WHERE user='root';
flush privileges;
PXC状态确认
show global status like 'wsrep%';
6.netstat进行查看,可以发现启动两个端口
netstat -lntp | grep mysql
tcp 0 0 0.0.0.0:4567 0.0.0.0:* LISTEN 2964/mysqld
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2964/mysqld
MySQL集群Percona XtraDB Cluster安装搭建步骤详解(5)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://www.heiqu.com/38c68b9ce8056158c8f93ec1d41fb7f0.html