pxc5.7配置安装
pxc5.7配置安装
一、准备工作
# Centos6.9 最小化安装操作系统
########################---- Centos最小化安装推荐常用依赖包---- ######################
yum clean all
yum -y update
yum -y install gcc-c++ gd libxml2-devel libjpeg-devel libpng-devel net-snmp-devel wget telnet vim zip unzip
yum -y install curl-devel libxslt-devel pcre-devel libjpeg libpng libcurl4-openssl-dev
yum -y install libcurl-devel libcurl freetype-config freetype freetype-devel unixODBC libxslt
yum -y install gcc automake autoconf libtool openssl-devel
yum -y install perl-devel perl-ExtUtils-Embed *libnuma*
yum -y install cmake ncurses-devel.x86_64 openldap-devel.x86_64 lrzsz openssh-clients gcc-g77 bison
yum -y install libmcrypt libmcrypt-devel mhash mhash-devel bzip2 bzip2-devel
yum -y install ntpdate rsync svn patch iptables iptables-services
yum -y install libevent libevent-devel cyrus-sasl cyrus-sasl-devel
yum -y install gd-devel libmemcached-devel memcached git libssl-devel libyaml-devel auto make
yum -y install gcc gcc-c++ make autoconf automake ncurses-devel bison ncurses cmake libaio libaio-devel boost
yum -y groupinstall "Development tools"
yum -y groupinstall "Server Platform Development" "Development tools"
yum -y install perl-IO-Socket-SSL.noarch perl-DBD-MySQL.x86_64 perl-Time-HiRes openssl openssl-devel perl-DBI perl-TermReadKey.x86_64
yum -y install scons check boost-devel asio-devel readline-devel pam-devel
# 下载安装多端口通信软件包,socat的主要特点就是在两个数据流之间建立通道;且支持众多协议和链接方式
cd /opt/
rpm -ivh https://www.percona.com/redir/downloads/percona-release/redhat/latest/percona-release-0.1-4.noarch.rpm
wget http://www.dest-unreach.org/socat/download/socat-1.7.3.2.tar.gz
tar -zxf socat-1.7.3.2.tar.gz
cd socat-1.7.3.2
./configure --disable-fips
make && make install
cd ..
ln -s /usr/local/bin/socat /usr/bin/
# 修改系统参数配置
cat >> /etc/sysctl.conf << EOF
##custom
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
net.ipv4.tcp_max_tw_buckets = 6000
net.ipv4.tcp_sack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304
net.core.wmem_default = 8388608
net.core.rmem_default = 8388608
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.netdev_max_backlog = 262144
net.core.somaxconn = 262144
net.ipv4.tcp_max_orphans = 3276800
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_timestamps = 0
#net.ipv4.tcp_synack_retries = 1
net.ipv4.tcp_synack_retries = 2
#net.ipv4.tcp_syn_retries = 1
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_mem = 94500000 915000000 927000000
#net.ipv4.tcp_fin_timeout = 1
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 30
net.ipv4.ip_local_port_range = 1024 65535
#net.ipv4.tcp_tw_len = 1
EOF #使其生效
sysctl -p
cat >> /etc/security/limits.conf << EOF
#
###custom
#
* soft nofile 20480
* hard nofile 65535
* soft nproc 20480
* hard nproc 65535
EOF
二、关闭防火墙和selinux
/etc/init.d/iptables stop # 防火墙配置,如果要配置的话
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT #默认端口: 3306
-A INPUT -m state --state NEW -m tcp -p tcp --dport 4444 -j ACCEPT #默认端口: 4444
-A INPUT -m state --state NEW -m tcp -p tcp --dport 4567 -j ACCEPT #默认端口: 4567
-A INPUT -m state --state NEW -m tcp -p tcp --dport 4568 -j ACCEPT #默认端口: 4568
# 关闭selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce 0
# 端口用途说明
pxc环境所涉及的端口:
#mysql实例端口
1. Regular MySQL port, default 3306.
#pxc cluster相互通讯的端口
2. Port for group communication, default 4567. It can be changed by the option:
wsrep_provider_options ="gmcast.listen_addr=tcp://0.0.0.0:4567; "
#用于SST传送的端口
3. Port for State Transfer, default 4444. It can be changed by the option:
wsrep_sst_receive_address=10.11.12.205:4444
#用于IST传送的端口
4. Port for Incremental State Transfer, default port for group communication + 1 (4568). It can be changed by the option:
wsrep_provider_options = "ist.recv_addr=10.11.12.206:4568; "
三、配置主机/etc/hosts
cat >>/etc/hosts<<"EOF"
192.168.65.128 my1-222
192.168.65.129 my2-223
192.168.65.130 my3-224
EOF
四、配置服务器ssh登录无密码验证
(1)在所有的主机上执行
ssh-keygen -t rsa # 在每台都需要操作
(2)将所有机子上公钥(id_rsa.pub)导到一个主机的/root/.ssh/authorized_keys文件中,然后将authorized_keys分别拷贝到所有主机上
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys # 只需要在192.168.65.128机器上操作这一步
ssh 192.168.65.129 cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys # 只需要在192.168.65.128机器上操作这一步
ssh 192.168.65.130 cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys # 只需要在192.168.65.128机器上操作这一步
scp /root/.ssh/authorized_keys 192.168.65.129:/root/.ssh/authorized_keys # 只需要在192.168.65.128机器上操作这一步
scp /root/.ssh/authorized_keys 192.168.65.130:/root/.ssh/authorized_keys # 只需要在192.168.65.128机器上操作这一步
#测试(强烈建议)
ssh 192.168.65.128
ssh 192.168.65.129
ssh 192.168.65.130 ssh my1-
ssh my2-
ssh my3-
五、下载安装包
# 基本初始化-三个机器都需要安装
mkdir -p /opt/mysql
cd /opt/mysql/
wget https://www.percona.com/downloads/Percona-XtraDB-Cluster-LATEST/Percona-XtraDB-Cluster-5.7.21-29.26/binary/tarball/Percona-XtraDB-Cluster-5.7.21-rel20-29.26.1.Linux.x86_64.ssl101.tar.gz
tar -zxf Percona-XtraDB-Cluster-5.7.-rel20-29.26..Linux.x86_64.ssl101.tar.gz
cd /usr/local/
ln -s /opt/mysql/Percona-XtraDB-Cluster-5.7.-rel20-29.26..Linux.x86_64.ssl101 mysql
# 创建所需要的目录
mkdir -p /data/mysql/mysql_3306/{data,logs,tmp}
# 更改权限
groupadd mysql
useradd -g mysql mysql -d /home/mysql -s /sbin/nologin
# 创建配置文件
# 第一台机器:192.168.65.128
# 附录:
cat >/data/mysql/mysql_3306/my_3306.cnf <<"EOF"
#my.cnf
[client]
port =
socket = /data/mysql/mysql_3306/tmp/mysql_3306.sock [mysql]
prompt="\\u@\\h:\p \\R:\\m:\\s [\\d]>"
#tee=/data/mysql/mysql_3306/data/query.log
no-auto-rehash [mysqld]
#misc
user = mysql
basedir = /usr/local/mysql
datadir = /data/mysql/mysql_3306/data
port =
socket = /data/mysql/mysql_3306/tmp/mysql_3306.sock
event_scheduler =
#tmp
tmpdir=/data/mysql/mysql_3306/tmp #timeout
interactive_timeout =
wait_timeout = #character set
#character-set-server = utf8
character-set-server = utf8mb4 open_files_limit =
max_connections =
max_connect_errors = skip-name-resolve =
#logs
log-output=file
slow_query_log =
slow_query_log_file = /data/mysql/mysql_3306/logs/slow.log
log-error = /data/mysql/mysql_3306/logs/mysql_3306_error.log
log_error_verbosity =
pid-file = mysql_3306.pid
long_query_time =
#log-slow-admin-statements =
#log-queries-not-using-indexes =
log-slow-slave-statements = #binlog
binlog_format = row
server-id =
log-bin = /data/mysql/mysql_3306/logs/mysql-bin
log-bin-index = /data/mysql/mysql_3306/logs/mysql-bin.index
binlog_cache_size = 4M
max_binlog_size = 1G
max_binlog_cache_size = 2G
sync_binlog =
expire_logs_days = #relay log
skip_slave_start =
max_relay_log_size = 1G
relay_log_purge =
relay_log_recovery =
log_slave_updates
#slave-skip-errors=,, explicit_defaults_for_timestamp=
#buffers & cache
table_open_cache =
table_definition_cache =
table_open_cache =
max_heap_table_size = 96M
sort_buffer_size = 2M
join_buffer_size = 2M
thread_cache_size =
query_cache_size =
query_cache_type =
query_cache_limit = 256K
query_cache_min_res_unit =
thread_stack = 192K
tmp_table_size = 96M
key_buffer_size = 8M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 32M #myisam
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads = #innodb
innodb_buffer_pool_size = 1G
innodb_buffer_pool_instances =
innodb_data_file_path = ibdata1:1G:autoextend
innodb_flush_log_at_trx_commit =
innodb_log_buffer_size = 64M
innodb_log_file_size = 500M
innodb_log_files_in_group =
innodb_max_dirty_pages_pct =
innodb_file_per_table =
innodb_rollback_on_timeout
innodb_status_file =
innodb_io_capacity =
transaction_isolation = READ-COMMITTED
innodb_flush_method = O_DIRECT
gtid_mode = ON
enforce_gtid_consistency = ON
master_info_repository = TABLE
relay-log-info-repository = TABLE
binlog_checksum = NONE
log_slave_updates = ON # Two-Master configure
#server-
#auto-increment-offset =
#auto-increment-increment = #server-
#auto-increment-offset =
#auto-increment-increment = slave_preserve_commit_order =
slave_transaction_retries =
log_timestamps = system
show_compatibility_56 = on
slave_parallel_workers =
slave_parallel_type = LOGICAL_CLOCK # group replication
##log-bin = mysql
##server-id =
##gtid_mode = ON
##enforce_gtid_consistency = ON
##master_info_repository = TABLE
##relay-log-info-repository = TABLE
##binlog_checksum = NONE
##log_slave_updates = ON
##binlog_format = row
##transaction_write_set_extraction=XXHASH64
##loose-group_replication_group_name = '3db33b36-0e51-409f-a61d-c99756e90154'
##loose-group_replication_start_on_boot = off
##loose-group_replication_local_address= "10.0.0.62:23306" # 不能超过5位数字
##loose-group_replication_group_seeds= "10.0.0.62:23306,10.0.0.62:23307,10.0.0.62:23308" # 不能超过5位数字
##loose-group_replication_bootstrap_group= off
# loose-group_replication_single_primary_mode=FALSE ###本次搭建的是mutil_mode
# loose-group_replication_enforce_update_everywhere_checks= TRUE #pxc
wsrep_provider = /usr/local/mysql/lib/libgalera_smm.so #库文件位置
# for mysqld port, for sst port, for ist port, for cluster communication port 端口作用及说明见上面
wsrep_cluster_address = gcomm://192.168.65.128:4567,192.168.65.129:4567,192.168.65.130:4567 #集群中所有节点的ip
wsrep_node_name = my1- #本节点的名字
wsrep_node_address = 192.168.65.128 #本节点的ip
wsrep_cluster_name = pxc_cyou #集群名字
wsrep_sst_auth = sst:aPJZiOCF #sst模式需要的用户名和密码
wsrep_sst_method = xtrabackup-v2 #采用什么方式复制数据。还支持mysqldump,rsync
wsrep_slave_threads = # 开启的复制线程数,建议cpu核数* ,解决apply_cb跟不上问题
pxc_strict_mode = ENFORCING #pxc严厉模式,还有DISABLED、PERMISSIVE、MASTER可选
innodb_autoinc_lock_mode = #自增锁的优化
wsrep_provider_options = "debug=1;gcache.size=1G" #打开调试模式 [mysqld_safe]
#malloc-lib=/usr/local/mysql/lib/jmalloc.so
nice=-
open-files-limit=
EOF
# 第二台机器:192.168.65.129
cat >/data/mysql/mysql_3306/my_3306.cnf <<"EOF"
#my.cnf
[client]
port =
socket = /data/mysql/mysql_3306/tmp/mysql_3306.sock [mysql]
prompt="\\u@\\h:\p \\R:\\m:\\s [\\d]>"
#tee=/data/mysql/mysql_3306/data/query.log
no-auto-rehash [mysqld]
#misc
user = mysql
basedir = /usr/local/mysql
datadir = /data/mysql/mysql_3306/data
port =
socket = /data/mysql/mysql_3306/tmp/mysql_3306.sock
event_scheduler =
#tmp
tmpdir=/data/mysql/mysql_3306/tmp #timeout
interactive_timeout =
wait_timeout = #character set
#character-set-server = utf8
character-set-server = utf8mb4 open_files_limit =
max_connections =
max_connect_errors = skip-name-resolve =
#logs
log-output=file
slow_query_log =
slow_query_log_file = /data/mysql/mysql_3306/logs/slow.log
log-error = /data/mysql/mysql_3306/logs/mysql_3306_error.log
log_error_verbosity =
pid-file = mysql_3306.pid
long_query_time =
#log-slow-admin-statements =
#log-queries-not-using-indexes =
log-slow-slave-statements = #binlog
binlog_format = row
server-id =
log-bin = /data/mysql/mysql_3306/logs/mysql-bin
log-bin-index = /data/mysql/mysql_3306/logs/mysql-bin.index
binlog_cache_size = 4M
max_binlog_size = 1G
max_binlog_cache_size = 2G
sync_binlog =
expire_logs_days = #relay log
skip_slave_start =
max_relay_log_size = 1G
relay_log_purge =
relay_log_recovery =
log_slave_updates
#slave-skip-errors=,, explicit_defaults_for_timestamp=
#buffers & cache
table_open_cache =
table_definition_cache =
table_open_cache =
max_heap_table_size = 96M
sort_buffer_size = 2M
join_buffer_size = 2M
thread_cache_size =
query_cache_size =
query_cache_type =
query_cache_limit = 256K
query_cache_min_res_unit =
thread_stack = 192K
tmp_table_size = 96M
key_buffer_size = 8M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 32M #myisam
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads = #innodb
innodb_buffer_pool_size = 1G
innodb_buffer_pool_instances =
innodb_data_file_path = ibdata1:1G:autoextend
innodb_flush_log_at_trx_commit =
innodb_log_buffer_size = 64M
innodb_log_file_size = 500M
innodb_log_files_in_group =
innodb_max_dirty_pages_pct =
innodb_file_per_table =
innodb_rollback_on_timeout
innodb_status_file =
innodb_io_capacity =
transaction_isolation = READ-COMMITTED
innodb_flush_method = O_DIRECT
gtid_mode = ON
enforce_gtid_consistency = ON
master_info_repository = TABLE
relay-log-info-repository = TABLE
binlog_checksum = NONE
log_slave_updates = ON # Two-Master configure
#server-
#auto-increment-offset =
#auto-increment-increment = #server-
#auto-increment-offset =
#auto-increment-increment = slave_preserve_commit_order =
slave_transaction_retries =
log_timestamps = system
show_compatibility_56 = on
slave_parallel_workers =
slave_parallel_type = LOGICAL_CLOCK # group replication
##log-bin = mysql
##server-id =
##gtid_mode = ON
##enforce_gtid_consistency = ON
##master_info_repository = TABLE
##relay-log-info-repository = TABLE
##binlog_checksum = NONE
##log_slave_updates = ON
##binlog_format = row
##transaction_write_set_extraction=XXHASH64
##loose-group_replication_group_name = '3db33b36-0e51-409f-a61d-c99756e90154'
##loose-group_replication_start_on_boot = off
##loose-group_replication_local_address= "10.0.0.62:23306" # 不能超过5位数字
##loose-group_replication_group_seeds= "10.0.0.62:23306,10.0.0.62:23307,10.0.0.62:23308" # 不能超过5位数字
##loose-group_replication_bootstrap_group= off
# loose-group_replication_single_primary_mode=FALSE ###本次搭建的是mutil_mode
# loose-group_replication_enforce_update_everywhere_checks= TRUE #pxc
wsrep_provider = /usr/local/mysql/lib/libgalera_smm.so #库文件位置
# for mysqld port, for sst port, for ist port, for cluster communication port 端口作用及说明见上面
wsrep_cluster_address = gcomm://192.168.65.128:4567,192.168.65.129:4567,192.168.65.130:4567 #集群中所有节点的ip
wsrep_node_name = my2- #本节点的名字
wsrep_node_address = 192.168.65.129 #本节点的ip
wsrep_cluster_name = pxc_cyou #集群名字
wsrep_sst_auth = sst:aPJZiOCF #sst模式需要的用户名和密码
wsrep_sst_method = xtrabackup-v2 #采用什么方式复制数据。还支持mysqldump,rsync
wsrep_slave_threads = # 开启的复制线程数,建议cpu核数* ,解决apply_cb跟不上问题
pxc_strict_mode = ENFORCING #pxc严厉模式,还有DISABLED、PERMISSIVE、MASTER可选
innodb_autoinc_lock_mode = #自增锁的优化
wsrep_provider_options = "debug=1;gcache.size=1G" #打开调试模式 [mysqld_safe]
#malloc-lib=/usr/local/mysql/lib/jmalloc.so
nice=-
open-files-limit=
EOF
# 第三台机器:192.168.65.130
cat >/data/mysql/mysql_3306/my_3306.cnf <<"EOF"
#my.cnf
[client]
port =
socket = /data/mysql/mysql_3306/tmp/mysql_3306.sock [mysql]
prompt="\\u@\\h:\p \\R:\\m:\\s [\\d]>"
#tee=/data/mysql/mysql_3306/data/query.log
no-auto-rehash [mysqld]
#misc
user = mysql
basedir = /usr/local/mysql
datadir = /data/mysql/mysql_3306/data
port =
socket = /data/mysql/mysql_3306/tmp/mysql_3306.sock
event_scheduler =
#tmp
tmpdir=/data/mysql/mysql_3306/tmp #timeout
interactive_timeout =
wait_timeout = #character set
#character-set-server = utf8
character-set-server = utf8mb4 open_files_limit =
max_connections =
max_connect_errors = skip-name-resolve =
#logs
log-output=file
slow_query_log =
slow_query_log_file = /data/mysql/mysql_3306/logs/slow.log
log-error = /data/mysql/mysql_3306/logs/mysql_3306_error.log
log_error_verbosity =
pid-file = mysql_3306.pid
long_query_time =
#log-slow-admin-statements =
#log-queries-not-using-indexes =
log-slow-slave-statements = #binlog
binlog_format = row
server-id =
log-bin = /data/mysql/mysql_3306/logs/mysql-bin
log-bin-index = /data/mysql/mysql_3306/logs/mysql-bin.index
binlog_cache_size = 4M
max_binlog_size = 1G
max_binlog_cache_size = 2G
sync_binlog =
expire_logs_days = #relay log
skip_slave_start =
max_relay_log_size = 1G
relay_log_purge =
relay_log_recovery =
log_slave_updates
#slave-skip-errors=,, explicit_defaults_for_timestamp=
#buffers & cache
table_open_cache =
table_definition_cache =
table_open_cache =
max_heap_table_size = 96M
sort_buffer_size = 2M
join_buffer_size = 2M
thread_cache_size =
query_cache_size =
query_cache_type =
query_cache_limit = 256K
query_cache_min_res_unit =
thread_stack = 192K
tmp_table_size = 96M
key_buffer_size = 8M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 32M #myisam
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads = #innodb
innodb_buffer_pool_size = 1G
innodb_buffer_pool_instances =
innodb_data_file_path = ibdata1:1G:autoextend
innodb_flush_log_at_trx_commit =
innodb_log_buffer_size = 64M
innodb_log_file_size = 500M
innodb_log_files_in_group =
innodb_max_dirty_pages_pct =
innodb_file_per_table =
innodb_rollback_on_timeout
innodb_status_file =
innodb_io_capacity =
transaction_isolation = READ-COMMITTED
innodb_flush_method = O_DIRECT
gtid_mode = ON
enforce_gtid_consistency = ON
master_info_repository = TABLE
relay-log-info-repository = TABLE
binlog_checksum = NONE
log_slave_updates = ON # Two-Master configure
#server-
#auto-increment-offset =
#auto-increment-increment = #server-
#auto-increment-offset =
#auto-increment-increment = slave_preserve_commit_order =
slave_transaction_retries =
log_timestamps = system
show_compatibility_56 = on
slave_parallel_workers =
slave_parallel_type = LOGICAL_CLOCK # group replication
##log-bin = mysql
##server-id =
##gtid_mode = ON
##enforce_gtid_consistency = ON
##master_info_repository = TABLE
##relay-log-info-repository = TABLE
##binlog_checksum = NONE
##log_slave_updates = ON
##binlog_format = row
##transaction_write_set_extraction=XXHASH64
##loose-group_replication_group_name = '3db33b36-0e51-409f-a61d-c99756e90154'
##loose-group_replication_start_on_boot = off
##loose-group_replication_local_address= "10.0.0.62:23306" # 不能超过5位数字
##loose-group_replication_group_seeds= "10.0.0.62:23306,10.0.0.62:23307,10.0.0.62:23308" # 不能超过5位数字
##loose-group_replication_bootstrap_group= off
# loose-group_replication_single_primary_mode=FALSE ###本次搭建的是mutil_mode
# loose-group_replication_enforce_update_everywhere_checks= TRUE #pxc
wsrep_provider = /usr/local/mysql/lib/libgalera_smm.so #库文件位置
# for mysqld port, for sst port, for ist port, for cluster communication port 端口作用及说明见上面
wsrep_cluster_address = gcomm://192.168.65.128:4567,192.168.65.129:4567,192.168.65.130:4567 #集群中所有节点的ip
wsrep_node_name = my3- #本节点的名字
wsrep_node_address = 192.168.65.130 #本节点的ip
wsrep_cluster_name = pxc_cyou #集群名字
wsrep_sst_auth = sst:aPJZiOCF #sst模式需要的用户名和密码
wsrep_sst_method = xtrabackup-v2 #采用什么方式复制数据。还支持mysqldump,rsync
wsrep_slave_threads = # 开启的复制线程数,建议cpu核数* ,解决apply_cb跟不上问题
pxc_strict_mode = ENFORCING #pxc严厉模式,还有DISABLED、PERMISSIVE、MASTER可选
innodb_autoinc_lock_mode = #自增锁的优化
wsrep_provider_options = "debug=1;gcache.size=1G" #打开调试模式 [mysqld_safe]
#malloc-lib=/usr/local/mysql/lib/jmalloc.so
nice=-
open-files-limit=
EOF
# 授权
chown -R mysql.mysql /data/mysql/
# 初始化
/usr/local/mysql/bin/mysqld --defaults-file=/data/mysql/mysql_3306/my_3306.cnf --initialize-insecure &
# 安装percona-xtrabackup
cd /opt/
wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.11/binary/tarball/percona-xtrabackup-2.4.11-Linux-x86_64.libgcrypt145.tar.gz
tar -xf percona-xtrabackup-2.4.-Linux-x86_64.libgcrypt145.tar.gz
ln -s /opt/percona-xtrabackup-2.4.-Linux-x86_64/bin/* /usr/bin/
#启动第一个实例
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
然后就是启动第一个节点,第一个节点在启动的时候要使用bootstrap-pxc的方式启动
也可以使用/usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf--wsrep_new_cluster &
其余的节点直接使用 /etc/init.d/mysql start启动
rm -rf /etc/my.cnf
ln -s /usr/local/mysql/bin/* /usr/bin/
ln -s /usr/local/mysql/bin/* /usr/sbin/
ln -s /data/mysql/mysql_3306/my_3306.cnf /etc/my.cnf
#遇到过的错误记录
# [root@my1- opt]# /etc/init.d/mysqld --help
# /etc/init.d/mysqld: line : my_print_defaults: command not found
# Usage: mysqld {start|stop|restart|restart-bootstrap|reload|force-reload|status|bootstrap-pxc} [ MySQL (Percona XtraDB Cluster) options ]
# [root@my1- opt]#
#
# 解决办法:
# rm -rf /etc/my.cnf
# ln -s /usr/local/mysql/bin/* /usr/bin/
# ln -s /usr/local/mysql/bin/* /usr/sbin/
# ln -s /data/mysql/mysql_3306/my_3306.cnf /etc/my.cnf # 修改启动文件路径
vi /etc/init.d/mysqld
basedir=/usr/local/mysql
datadir=/data/mysql/mysql_3306/data # 否则会报如下错误的
# [root@my1-222 opt]# /etc/init.d/mysqld bootstrap-pxc
#
Bootstrapping PXC (Percona XtraDB Cluster)Initializing MySQL database:
/etc/rc.d/init.d/functions: line 722: /usr/sbin/mysqld: No such file or
directory
# 第一台机器方式:
/etc/init.d/mysqld bootstrap-pxc
# 查看日志
tail -f /data/mysql/mysql_3306/logs/mysql_3306_error.log
# 登陆数据库(5.6需要,5.7的不需要)
-- delete from mysql.user where user!='root' or host!='localhost';
-- grant all privileges on *.* to 'sst'@'%' identified by 'aPJZiOCF';
-- grant all privileges on *.* to 'sst'@'localhost' identified by 'aPJZiOCF';
-- flush privileges; CREATE USER 'sst'@'localhost' IDENTIFIED BY 'aPJZiOCF';
CREATE USER 'sst'@'%' IDENTIFIED BY 'aPJZiOCF';
GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT, PROCESS ON *.* TO 'sst'@'localhost';
GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT, PROCESS ON *.* TO 'sst'@'%';
FLUSH PRIVILEGES;
# 第二、第三台机的启动方法
/etc/init.d/mysqld start
# 如果三台都关闭了,那么要先启动最后关闭的那台机器的服务。
备注:最后一个停止的节点,需要第一个启动,启动方式为bootstrap-pxc启动
/etc/init.d/mysqld bootstrap-pxc
附录:其中第一台机器的日志
[root@my1- ~]# cat /data/mysql/mysql_3306/logs/mysql_3306_error.log
--17T01::19.772145+: [Note] Ignoring --secure-file-priv value as server is running with --initialize(-insecure) or --bootstrap.
--17T01::19.772197+: [Warning] WSREP: Node is running in bootstrap/initialize mode. Disabling pxc_strict_mode checks
--17T01::19.772210+: [Note] /usr/local/mysql/bin/mysqld (mysqld 5.7.--29.26-log) starting as process ...
--17T01::19.773378+: [Note] --initialize specifed on an existing data directory.
--17T01::19.774105+: [Note] WSREP: Setting wsrep_ready to false
--17T01::19.774115+: [Note] WSREP: Found pre-stored initial position: 6c5f3333--2f64--612f00000000:
--17T01::19.774119+: [Note] WSREP: wsrep_load(): loading provider library 'none'
--17T01::19.774125+: [Note] WSREP: Setting wsrep_ready to true
--17T01::19.779785+: [Note] InnoDB: PUNCH HOLE support available
--17T01::19.779827+: [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
--17T01::19.779833+: [Note] InnoDB: Uses event mutexes
--17T01::19.779838+: [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
--17T01::19.779841+: [Note] InnoDB: Compressed tables use zlib 1.2.
--17T01::19.779845+: [Note] InnoDB: Using Linux native AIO
--17T01::19.780293+: [Note] InnoDB: Number of pools:
--17T01::19.780624+: [Note] InnoDB: Using CPU crc32 instructions
--17T01::19.783782+: [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = , chunk size = 128M
--17T01::20.165966+: [Note] InnoDB: Completed initialization of buffer pool
--17T01::20.232610+: [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
--17T01::20.242908+: [Note] InnoDB: The first innodb_system data file 'ibdata1' did not exist. A new tablespace will be created!
--17T01::20.244572+: [Note] InnoDB: Setting file './ibdata1' size to MB. Physically writing the file full; Please wait ...
--17T01::20.245301+: [Note] InnoDB: Progress in MB: --17T01::20.567190+: [Note] InnoDB: File './ibdata1' size is now MB.
--17T01::20.567566+: [Note] InnoDB: Setting log file ./ib_logfile101 size to MB
--17T01::20.567708+: [Note] InnoDB: Progress in MB: --17T01::21.148846+: [Note] InnoDB: Setting log file ./ib_logfile1 size to MB
--17T01::21.148950+: [Note] InnoDB: Progress in MB: --17T01::21.888383+: [Note] InnoDB: Setting log file ./ib_logfile2 size to MB
--17T01::21.888575+: [Note] InnoDB: Progress in MB: --17T01::22.372274+: [Note] InnoDB: Created parallel doublewrite buffer at /data/mysql/mysql_3306/data/xb_doublewrite, size bytes
--17T01::22.462969+: [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
--17T01::22.463032+: [Warning] InnoDB: New log files created, LSN=
--17T01::22.463044+: [Note] InnoDB: Creating shared tablespace for temporary tables
--17T01::22.463134+: [Note] InnoDB: Setting file './ibtmp1' size to MB. Physically writing the file full; Please wait ...
--17T01::22.467994+: [Note] InnoDB: File './ibtmp1' size is now MB.
--17T01::22.468132+: [Note] InnoDB: Doublewrite buffer not found: creating new
--17T01::22.638206+: [Note] InnoDB: Doublewrite buffer created
--17T01::22.724899+: [Note] InnoDB: redo rollback segment(s) found. redo rollback segment(s) are active.
--17T01::22.724929+: [Note] InnoDB: non-redo rollback segment(s) are active.
--17T01::22.746522+: [Warning] InnoDB: Creating foreign key constraint system tables.
--17T01::22.834978+: [Note] InnoDB: Foreign key constraint system tables created
--17T01::22.835013+: [Note] InnoDB: Creating tablespace and datafile system tables.
--17T01::22.835147+: [Note] InnoDB: Tablespace and datafile system tables created.
--17T01::22.835159+: [Note] InnoDB: Creating sys_virtual system tables.
--17T01::22.835236+: [Note] InnoDB: sys_virtual table created
--17T01::22.835247+: [Note] InnoDB: Creating zip_dict and zip_dict_cols system tables.
--17T01::22.835395+: [Note] InnoDB: zip_dict and zip_dict_cols system tables created.
--17T01::22.836061+: [Note] InnoDB: Waiting for purge to start
--17T01::22.886876+: [Note] InnoDB: Waiting for purge to start
--17T01::22.937102+: [Note] InnoDB: Waiting for purge to start
--17T01::22.987999+: [Note] InnoDB: Waiting for purge to start
--17T01::23.038690+: [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.21-rel20 started; log sequence number 0
--17T01::23.082875+: [Note] Plugin 'FEDERATED' is disabled.
--17T01::23.634524+: [Note] Salting uuid generator variables, current_pid: , server_start_time: , bytes_sent: ,
--17T01::23.685592+: [Note] Generated uuid: '83591f27-592f-11e8-bac1-000c2921d086', server_start_time: , bytes_sent:
--17T01::23.685746+: [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 83591f27-592f-11e8-bac1-000c2921d086.
--17T01::23.750884+: [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
--17T01::24.166162+: [Note] Auto generated SSL certificates are placed in data directory.
--17T01::24.380307+: [Warning] CA certificate ca.pem is self signed.
--17T01::24.417354+: [Note] Auto generated RSA key files are placed in data directory.
--17T01::24.576049+: [Note] Creating the system database
--17T01::24.576078+: [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
--17T01::24.808537+: [Note] Creating the system tables
--17T01::27.673657+: [Note] Filling in the system tables, part
--17T01::27.745614+: [Note] Filling in the system tables, part
--17T01::27.745629+: [Note] Filling in the mysql.help table
--17T01::28.733067+: [Note] Creating user for internal session service
--17T01::28.733779+: [Note] Creating the sys schema
--17T01::28.734172+: [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
--17T01::28.734191+: [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::28.734199+: [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::28.734211+: [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::28.734216+: [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::28.734236+: [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
--17T01::28.734279+: [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::28.734285+: [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::30.221496+: [Note] Bootstrapping complete
--17T01::30.221722+: [Note] Giving client threads a chance to die gracefully
--17T01::30.221739+: [Note] WSREP: Waiting for active wsrep applier to exit
--17T01::30.221743+: [Note] WSREP: Service disconnected.
--17T01::30.221750+: [Note] WSREP: Waiting to close threads......
--17T01::35.222528+: [Note] WSREP: Some threads may fail to exit.
--17T01::35.222764+: [Note] Giving client threads a chance to die gracefully
--17T01::35.222782+: [Note] Shutting down slave threads
--17T01::35.236119+: [Note] Forcefully disconnecting remaining clients
--17T01::35.271286+: [Note] Binlog end
--17T01::35.273673+: [Note] InnoDB: FTS optimize thread exiting.
--17T01::35.273782+: [Note] InnoDB: Starting shutdown...
--17T01::35.374269+: [Note] InnoDB: Dumping buffer pool(s) to /data/mysql/mysql_3306/data/ib_buffer_pool
--17T01::35.374954+: [Note] InnoDB: Buffer pool(s) dump completed at ::
--17T01::36.180704+: [Note] InnoDB: Waiting for page_cleaner to finish flushing of buffer pool
--17T01::36.935238+: [Note] InnoDB: Shutdown completed; log sequence number
--17T01::36.935370+: [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
--17T01::17.266185+: [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
--17T01::17.266243+: [Note] /usr/local/mysql/bin/mysqld (mysqld 5.7.--29.26-log) starting as process ...
--17T01::17.293348+: [Note] WSREP: Setting wsrep_ready to false
--17T01::17.293386+: [Note] WSREP: No pre-stored wsrep-start position found. Skipping position initialization.
--17T01::17.293391+: [Note] WSREP: wsrep_load(): loading provider library '/usr/local/mysql/lib/libgalera_smm.so'
--17T01::17.363053+: [Note] WSREP: wsrep_load(): Galera 3.26(r) by Codership Oy <info@codership.com> loaded successfully.
--17T01::17.363138+: [Note] WSREP: CRC-32C: using hardware acceleration.
--17T01::17.374986+: [Warning] WSREP: galera/src/saved_state.cpp:SavedState():: Could not open state file for reading: '/data/mysql/mysql_3306/data//grastate.dat'
--17T01::17.375032+: [Warning] WSREP: galera/src/saved_state.cpp:SavedState():: No persistent state found. Bootstraping with default state
--17T01::17.375157+: [Note] WSREP: galera/src/saved_state.cpp:SavedState():: Found saved state: ----:-, safe_to_bootstrap:
--17T01::17.378555+: [Note] WSREP: galera/src/galera_gcs.hpp:Gcs():: Passing config to GCS: base_dir = /data/mysql/mysql_3306/data/; base_host = 192.168.65.128; base_port = ; cert.log_conflicts = no; debug = ; evs.auto_evict = ; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = ; evs.send_window = ; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = ; evs.view_forget_timeout = PT24H; gcache.dir = /data/mysql/mysql_3306/data/; gcache.freeze_purge_at_seqno = -; gcache.keep_pages_count = ; gcache.keep_pages_size = ; gcache.mem_size = ; gcache.name = /data/mysql/mysql_3306/data//galera.cache; gcache.page_size = 128M; gcache.recover = no; gcache.size = 1G; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1; gcs.fc_limit = 100; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.segment = 0; gmcast.version = 0; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.npvo = false; pc.recovery = 1; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT30S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 8; socket.checksum = 2; socket.recv_buf_size = 212992;
--17T01::17.411747+: [Note] WSREP: gcache/src/GCache_seqno.cpp:seqno_reset():: GCache history reset: ----: -> ----:-
--17T01::17.413381+: [Note] WSREP: galera/src/certification.cpp:assign_initial_position():: Assign initial position for certification: -, protocol version: -
--17T01::17.413453+: [Note] WSREP: Preparing to initiate SST/IST
--17T01::17.413461+: [Note] WSREP: Starting replication
--17T01::17.413487+: [Note] WSREP: galera/src/replicator_smm.cpp:connect():: Setting initial position to ----:-
--17T01::17.414419+: [Note] WSREP: gcomm/src/datagram.cpp:checksum_type():: Using CRC-32C for message checksums.
--17T01::17.414627+: [Note] WSREP: gcs/src/gcs_gcomm.cpp:connect():: gcomm thread scheduling priority set to other:
--17T01::17.415218+: [Warning] WSREP: gcomm/src/view.cpp:read_file():: Fail to access the file (/data/mysql/mysql_3306/data//gvwstate.dat) error (No such file or directory). It is possible if node is booting for first time or re-booting after a graceful shutdown
--17T01::17.415278+: [Note] WSREP: gcomm/src/pc.cpp:PC():: Restoring primary-component from disk failed. Either node is booting for first time or re-booting after a graceful shutdown
--17T01::17.416620+: [Note] WSREP: gcomm/src/gmcast.cpp:GMCast():: GMCast version
--17T01::17.416838+: [Note] WSREP: gcomm/src/gmcast.cpp:GMCast():: (980e7263, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567
--17T01::17.416851+: [Note] WSREP: gcomm/src/gmcast.cpp:GMCast():: (980e7263, 'tcp://0.0.0.0:4567') multicast: , ttl:
--17T01::17.417090+: [Note] WSREP: gcomm/src/evs_proto.cpp:Proto():: EVS version
--17T01::17.417181+: [Note] WSREP: gcs/src/gcs_gcomm.cpp:connect():: gcomm: bootstrapping new group 'pxc_cyou'
--17T01::17.417218+: [Note] WSREP: gcomm/src/pc.cpp:connect():: start_prim is enabled, turn off pc_recovery
--17T01::17.425982+: [Note] WSREP: gcomm/src/pc_proto.cpp:is_prim():: Node 980e7263 state primary
--17T01::17.426061+: [Note] WSREP: gcomm/src/pc_proto.cpp:deliver_view():: Current view of cluster as seen by this node
view (view_id(PRIM,980e7263,)
memb {
980e7263,
}
joined {
}
left {
}
partitioned {
}
)
--17T01::17.426087+: [Note] WSREP: gcomm/src/pc.cpp:handle_up():: Save the discovered primary-component to disk
--17T01::17.426216+: [Note] WSREP: gcomm/src/gmcast.cpp:handle_stable_view():: discarding pending addr without UUID: tcp://192.168.65.128:4567
--17T01::17.426240+: [Note] WSREP: gcomm/src/gmcast.cpp:handle_stable_view():: discarding pending addr proto entry 0x28281a0
--17T01::17.426264+: [Note] WSREP: gcomm/src/gmcast.cpp:handle_stable_view():: discarding pending addr without UUID: tcp://192.168.65.129:4567
--17T01::17.426284+: [Note] WSREP: gcomm/src/gmcast.cpp:handle_stable_view():: discarding pending addr proto entry 0x2830970
--17T01::17.426298+: [Note] WSREP: gcomm/src/gmcast.cpp:handle_stable_view():: discarding pending addr without UUID: tcp://192.168.65.130:4567
--17T01::17.426317+: [Note] WSREP: gcomm/src/gmcast.cpp:handle_stable_view():: discarding pending addr proto entry 0x28390b0
--17T01::17.426341+: [Note] WSREP: gcs/src/gcs_gcomm.cpp:connect():: gcomm: connected
--17T01::17.426432+: [Note] WSREP: gcs/src/gcs.cpp:gcs_shift_state():: Shifting CLOSED -> OPEN (TO: )
--17T01::17.426830+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_comp_msg():: New COMPONENT: primary = yes, bootstrap = no, my_idx = , memb_num =
--17T01::17.426952+: [Note] WSREP: Waiting for SST/IST to complete.
--17T01::17.427992+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_comp_msg():: Starting new group from scratch: 981052d1--11e8-95f8-6b4d972d0618
--17T01::17.428533+: [Note] WSREP: gcs/src/gcs_core.cpp:core_handle_comp_msg():: STATE_EXCHANGE: sent state UUID: --11e8--ce4da364f82c
--17T01::17.428575+: [Note] WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg():: STATE EXCHANGE: sent state msg: --11e8--ce4da364f82c
--17T01::17.428585+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_state_msg():: STATE EXCHANGE: got state msg: --11e8--ce4da364f82c from (my1-)
--17T01::17.428593+: [Note] WSREP: gcs/src/gcs_group.cpp:group_print_state_debug()::
Version :
Flags : 0x1
Protocols : / /
State : JOINED
Desync count :
Prim state : NON-PRIMARY
Prim UUID : 98103ecb--11e8-a9ce-06f5a9ed25ac
Prim seqno :
First seqno : -
Last seqno :
Prim JOINED :
State UUID : --11e8--ce4da364f82c
Group UUID : 981052d1--11e8-95f8-6b4d972d0618
Name : 'my1-222'
Incoming addr: '192.168.65.128:3306' --17T01::17.428600+: [Note] WSREP: gcs/src/gcs_group.cpp:group_post_state_exchange():: Quorum results:
version = ,
component = PRIMARY,
conf_id = ,
members = / (primary/total),
act_id = ,
last_appl. = -,
protocols = // (gcs/repl/appl),
group UUID = 981052d1--11e8-95f8-6b4d972d0618
--17T01::17.428605+: [Note] WSREP: gcs/src/gcs.cpp:_set_fc_limits():: Flow-control interval: [, ]
--17T01::17.428610+: [Note] WSREP: gcs/src/gcs_sm.hpp:gcs_sm_continue():: Trying to continue unpaused monitor
--17T01::17.428613+: [Note] WSREP: gcs/src/gcs.cpp:gcs_handle_act_conf():: Restored state OPEN -> JOINED ()
--17T01::17.428623+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_sync_msg():: Member 0.0 (my1-) synced with group.
--17T01::17.428628+: [Note] WSREP: gcs/src/gcs.cpp:gcs_shift_state():: Shifting JOINED -> SYNCED (TO: )
--17T01::17.458316+: [Note] WSREP: New cluster view: global state: 981052d1--11e8-95f8-6b4d972d0618:, view# : Primary, number of nodes: , my index: , protocol version
--17T01::17.458460+: [Note] WSREP: Setting wsrep_ready to true
--17T01::17.458581+: [Note] WSREP: SST complete, seqno:
--17T01::17.463722+: [Note] InnoDB: PUNCH HOLE support available
--17T01::17.463794+: [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
--17T01::17.463867+: [Note] InnoDB: Uses event mutexes
--17T01::17.463937+: [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
--17T01::17.464022+: [Note] InnoDB: Compressed tables use zlib 1.2.
--17T01::17.464083+: [Note] InnoDB: Using Linux native AIO
--17T01::17.464803+: [Note] InnoDB: Number of pools:
--17T01::17.465418+: [Note] InnoDB: Using CPU crc32 instructions
--17T01::17.474508+: [Note] InnoDB: Initializing buffer pool, total size = 1G, instances = , chunk size = 128M
--17T01::17.588843+: [Note] InnoDB: Completed initialization of buffer pool
--17T01::17.645874+: [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
--17T01::17.698503+: [Note] InnoDB: Crash recovery did not find the parallel doublewrite buffer at /data/mysql/mysql_3306/data/xb_doublewrite
--17T01::17.700525+: [Note] InnoDB: Highest supported file format is Barracuda.
--17T01::17.741153+: [Note] InnoDB: Created parallel doublewrite buffer at /data/mysql/mysql_3306/data/xb_doublewrite, size bytes
--17T01::17.888093+: [Note] InnoDB: Creating shared tablespace for temporary tables
--17T01::17.888241+: [Note] InnoDB: Setting file './ibtmp1' size to MB. Physically writing the file full; Please wait ...
--17T01::17.893192+: [Note] InnoDB: File './ibtmp1' size is now MB.
--17T01::17.893944+: [Note] InnoDB: redo rollback segment(s) found. redo rollback segment(s) are active.
--17T01::17.893973+: [Note] InnoDB: non-redo rollback segment(s) are active.
--17T01::17.895820+: [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.7.21-rel20 started; log sequence number 2556467
--17T01::17.897476+: [Note] InnoDB: Loading buffer pool(s) from /data/mysql/mysql_3306/data/ib_buffer_pool
--17T01::17.897534+: [Note] Plugin 'FEDERATED' is disabled.
--17T01::17.945961+: [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
--17T01::17.946004+: [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
--17T01::17.952170+: [Warning] CA certificate ca.pem is self signed.
--17T01::17.952485+: [Note] Skipping generation of RSA key pair as key files are present in data directory.
--17T01::17.952717+: [Note] Server hostname (bind-address): '*'; port:
--17T01::17.952822+: [Note] IPv6 is available.
--17T01::17.952844+: [Note] - '::' resolves to '::';
--17T01::17.952864+: [Note] Server socket created on IP: '::'.
--17T01::17.972223+: [Note] InnoDB: Buffer pool(s) load completed at ::
--17T01::17.978401+: [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
--17T01::17.978488+: [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::17.978501+: [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::17.978518+: [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::17.978526+: [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::17.978535+: [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
--17T01::18.001905+: [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::18.001948+: [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::18.014839+: [Note] Event Scheduler: Loaded events
--17T01::18.018033+: [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.7.21-20-29.26-log' socket: '/data/mysql/mysql_3306/tmp/mysql_3306.sock' port: Percona XtraDB Cluster binary (GPL) 5.7.-29.26, Revision 1702aea, wsrep_29.
--17T01::18.018992+: [Note] WSREP: Initialized wsrep sidno
--17T01::18.019048+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--17T01::18.019073+: [Note] WSREP: galera/src/replicator_smm.cpp:establish_protocol_versions():: REPL Protocols: (, )
--17T01::18.019083+: [Note] WSREP: galera/src/certification.cpp:assign_initial_position():: Assign initial position for certification: , protocol version:
--17T01::18.019174+: [Note] WSREP: galera/src/galera_service_thd.cpp:thd_func():: Service thread queue flushed.
--17T01::18.019268+: [Note] WSREP: gcache/src/GCache_seqno.cpp:seqno_reset():: GCache history reset: ----: -> 981052d1--11e8-95f8-6b4d972d0618:
--17T01::18.021254+: [Note] WSREP: Synchronized with group, ready for connections
--17T01::18.021290+: [Note] WSREP: Setting wsrep_ready to true
--17T01::18.021304+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--17T01::57.955839+: [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
--17T01::57.955911+: [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::57.955923+: [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::57.955930+: [Warning] 'user' entry 'sst@localhost' ignored in --skip-name-resolve mode.
--17T01::57.955945+: [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::57.955950+: [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::57.955960+: [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
--17T01::57.956017+: [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::57.956087+: [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::43.546356+: [Warning] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
--17T01::43.546412+: [Warning] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::43.546426+: [Warning] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::43.546434+: [Warning] 'user' entry 'sst@localhost' ignored in --skip-name-resolve mode.
--17T01::43.546476+: [Warning] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::43.546496+: [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::43.546508+: [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
--17T01::43.546552+: [Warning] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
--17T01::43.546576+: [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
--17T01::58.862992+: [Note] WSREP: gcomm/src/gmcast.cpp:handle_established():: (980e7263, 'tcp://0.0.0.0:4567') connection established to d48a58f9 tcp://192.168.65.129:4567
--17T01::58.864023+: [Note] WSREP: gcomm/src/gmcast.cpp:check_liveness():: (980e7263, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers:
--17T01::59.364266+: [Note] WSREP: gcomm/src/gmcast.cpp:handle_stable_view():: declaring d48a58f9 at tcp://192.168.65.129:4567 stable
--17T01::59.365750+: [Note] WSREP: gcomm/src/pc_proto.cpp:is_prim():: Node 980e7263 state primary
--17T01::59.366839+: [Note] WSREP: gcomm/src/pc_proto.cpp:deliver_view():: Current view of cluster as seen by this node
view (view_id(PRIM,980e7263,)
memb {
980e7263,
d48a58f9,
}
joined {
}
left {
}
partitioned {
}
)
--17T01::59.366892+: [Note] WSREP: gcomm/src/pc.cpp:handle_up():: Save the discovered primary-component to disk
--17T01::59.368912+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_comp_msg():: New COMPONENT: primary = yes, bootstrap = no, my_idx = , memb_num =
--17T01::59.369697+: [Note] WSREP: gcs/src/gcs_core.cpp:core_handle_comp_msg():: STATE_EXCHANGE: sent state UUID: d4d35610--11e8--badac771d91a
--17T01::59.371403+: [Note] WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg():: STATE EXCHANGE: sent state msg: d4d35610--11e8--badac771d91a
--17T01::59.372265+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_state_msg():: STATE EXCHANGE: got state msg: d4d35610--11e8--badac771d91a from (my1-)
--17T01::59.372321+: [Note] WSREP: gcs/src/gcs_group.cpp:group_print_state_debug()::
Version :
Flags : 0x3
Protocols : / /
State : SYNCED
Desync count :
Prim state : SYNCED
Prim UUID : --11e8--ce4da364f82c
Prim seqno :
First seqno :
Last seqno :
Prim JOINED :
State UUID : d4d35610--11e8--badac771d91a
Group UUID : 981052d1--11e8-95f8-6b4d972d0618
Name : 'my1-222'
Incoming addr: '192.168.65.128:3306' --17T01::59.864594+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_state_msg():: STATE EXCHANGE: got state msg: d4d35610--11e8--badac771d91a from (my2-)
--17T01::59.864643+: [Note] WSREP: gcs/src/gcs_group.cpp:group_print_state_debug()::
Version :
Flags :
Protocols : / /
State : NON-PRIMARY
Desync count :
Prim state : NON-PRIMARY
Prim UUID : ----
Prim seqno : -
First seqno : -
Last seqno : -
Prim JOINED :
State UUID : d4d35610--11e8--badac771d91a
Group UUID : ----
Name : 'my2-223'
Incoming addr: '192.168.65.129:3306' --17T01::59.864655+: [Note] WSREP: gcs/src/gcs_group.cpp:group_post_state_exchange():: Quorum results:
version = ,
component = PRIMARY,
conf_id = ,
members = / (primary/total),
act_id = ,
last_appl. = ,
protocols = // (gcs/repl/appl),
group UUID = 981052d1--11e8-95f8-6b4d972d0618
--17T01::59.864662+: [Note] WSREP: gcs/src/gcs.cpp:_set_fc_limits():: Flow-control interval: [, ]
--17T01::59.864666+: [Note] WSREP: gcs/src/gcs_sm.hpp:gcs_sm_continue():: Trying to continue unpaused monitor
--17T01::59.864789+: [Note] WSREP: New cluster view: global state: 981052d1--11e8-95f8-6b4d972d0618:, view# : Primary, number of nodes: , my index: , protocol version
--17T01::59.864803+: [Note] WSREP: Setting wsrep_ready to true
--17T01::59.864813+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--17T01::59.864820+: [Note] WSREP: galera/src/replicator_smm.cpp:establish_protocol_versions():: REPL Protocols: (, )
--17T01::59.864838+: [Note] WSREP: galera/src/certification.cpp:assign_initial_position():: Assign initial position for certification: , protocol version:
--17T01::59.864882+: [Note] WSREP: galera/src/galera_service_thd.cpp:thd_func():: Service thread queue flushed.
--17T01::00.529837+: [Note] WSREP: gcs/src/gcs_group.cpp:group_select_donor():: Member 1.0 (my2-) requested state transfer from '*any*'. Selected 0.0 (my1-)(SYNCED) as donor.
--17T01::00.529900+: [Note] WSREP: gcs/src/gcs.cpp:gcs_shift_state():: Shifting SYNCED -> DONOR/DESYNCED (TO: )
--17T01::00.530002+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--17T01::00.530803+: [Note] WSREP: Initiating SST/IST transfer on DONOR side (wsrep_sst_xtrabackup-v2 --role 'donor' --address '192.168.65.129:4444/xtrabackup_sst//1' --socket '/data/mysql/mysql_3306/tmp/mysql_3306.sock' --datadir '/data/mysql/mysql_3306/data/' --defaults-file '/etc/my.cnf' --defaults-group-suffix '' --binlog '/data/mysql/mysql_3306/logs/mysql-bin' --gtid '981052d1-5931-11e8-95f8-6b4d972d0618:10')
--17T01::00.576254+: [Note] WSREP: DONOR thread signaled with
--17T01::02.132483+: [Note] WSREP: gcomm/src/gmcast.cpp:check_liveness():: (980e7263, 'tcp://0.0.0.0:4567') turning message relay requesting off
--16T17::.037831Z WSREP_SST: [INFO] Streaming the backup to joiner at 192.168.65.129
--17T01::39.678013+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_join_msg():: 0.0 (my1-): State transfer to 1.0 (my2-) complete.
--17T01::39.678107+: [Note] WSREP: gcs/src/gcs.cpp:gcs_shift_state():: Shifting DONOR/DESYNCED -> JOINED (TO: )
--17T01::39.679181+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_sync_msg():: Member 0.0 (my1-) synced with group.
--17T01::39.679277+: [Note] WSREP: gcs/src/gcs.cpp:gcs_shift_state():: Shifting JOINED -> SYNCED (TO: )
--17T01::39.679342+: [Note] WSREP: Synchronized with group, ready for connections
--17T01::39.679386+: [Note] WSREP: Setting wsrep_ready to true
--17T01::39.679396+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--17T01::48.454000+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_join_msg():: 1.0 (my2-): State transfer from 0.0 (my1-) complete.
--17T01::48.454715+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_sync_msg():: Member 1.0 (my2-) synced with group.
--17T01::59.315214+: [Note] WSREP: gcomm/src/gmcast.cpp:handle_established():: (980e7263, 'tcp://0.0.0.0:4567') connection established to f8911862 tcp://192.168.65.130:4567
--17T01::59.316580+: [Note] WSREP: gcomm/src/gmcast.cpp:check_liveness():: (980e7263, 'tcp://0.0.0.0:4567') turning message relay requesting on, nonlive peers:
--17T01::59.425060+: [Note] WSREP: gcomm/src/gmcast.cpp:handle_stable_view():: declaring d48a58f9 at tcp://192.168.65.129:4567 stable
--17T01::59.425111+: [Note] WSREP: gcomm/src/gmcast.cpp:handle_stable_view():: declaring f8911862 at tcp://192.168.65.130:4567 stable
--17T01::59.426122+: [Note] WSREP: gcomm/src/pc_proto.cpp:is_prim():: Node 980e7263 state primary
--17T01::59.429044+: [Note] WSREP: gcomm/src/pc_proto.cpp:deliver_view():: Current view of cluster as seen by this node
view (view_id(PRIM,980e7263,)
memb {
980e7263,
d48a58f9,
f8911862,
}
joined {
}
left {
}
partitioned {
}
)
--17T01::59.429109+: [Note] WSREP: gcomm/src/pc.cpp:handle_up():: Save the discovered primary-component to disk
--17T01::59.430406+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_comp_msg():: New COMPONENT: primary = yes, bootstrap = no, my_idx = , memb_num =
--17T01::59.431186+: [Note] WSREP: gcs/src/gcs_core.cpp:core_handle_comp_msg():: STATE_EXCHANGE: sent state UUID: f89ffe41--11e8-b95d-d31cbbb4291e
--17T01::59.433335+: [Note] WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg():: STATE EXCHANGE: sent state msg: f89ffe41--11e8-b95d-d31cbbb4291e
--17T01::59.435402+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_state_msg():: STATE EXCHANGE: got state msg: f89ffe41--11e8-b95d-d31cbbb4291e from (my1-)
--17T01::59.435515+: [Note] WSREP: gcs/src/gcs_group.cpp:group_print_state_debug()::
Version :
Flags : 0x3
Protocols : / /
State : SYNCED
Desync count :
Prim state : SYNCED
Prim UUID : d4d35610--11e8--badac771d91a
Prim seqno :
First seqno :
Last seqno :
Prim JOINED :
State UUID : f89ffe41--11e8-b95d-d31cbbb4291e
Group UUID : 981052d1--11e8-95f8-6b4d972d0618
Name : 'my1-222'
Incoming addr: '192.168.65.128:3306' --17T01::59.435563+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_state_msg():: STATE EXCHANGE: got state msg: f89ffe41--11e8-b95d-d31cbbb4291e from (my2-)
--17T01::59.435578+: [Note] WSREP: gcs/src/gcs_group.cpp:group_print_state_debug()::
Version :
Flags : 0x2
Protocols : / /
State : SYNCED
Desync count :
Prim state : SYNCED
Prim UUID : d4d35610--11e8--badac771d91a
Prim seqno :
First seqno : -
Last seqno :
Prim JOINED :
State UUID : f89ffe41--11e8-b95d-d31cbbb4291e
Group UUID : 981052d1--11e8-95f8-6b4d972d0618
Name : 'my2-223'
Incoming addr: '192.168.65.129:3306' --17T01::59.816445+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_state_msg():: STATE EXCHANGE: got state msg: f89ffe41--11e8-b95d-d31cbbb4291e from (my3-)
--17T01::59.816504+: [Note] WSREP: gcs/src/gcs_group.cpp:group_print_state_debug()::
Version :
Flags :
Protocols : / /
State : NON-PRIMARY
Desync count :
Prim state : NON-PRIMARY
Prim UUID : ----
Prim seqno : -
First seqno : -
Last seqno : -
Prim JOINED :
State UUID : f89ffe41--11e8-b95d-d31cbbb4291e
Group UUID : ----
Name : 'my3-224'
Incoming addr: '192.168.65.130:3306' --17T01::59.816533+: [Note] WSREP: gcs/src/gcs_group.cpp:group_post_state_exchange():: Quorum results:
version = ,
component = PRIMARY,
conf_id = ,
members = / (primary/total),
act_id = ,
last_appl. = ,
protocols = // (gcs/repl/appl),
group UUID = 981052d1--11e8-95f8-6b4d972d0618
--17T01::59.816544+: [Note] WSREP: gcs/src/gcs.cpp:_set_fc_limits():: Flow-control interval: [, ]
--17T01::59.816550+: [Note] WSREP: gcs/src/gcs_sm.hpp:gcs_sm_continue():: Trying to continue unpaused monitor
--17T01::59.816688+: [Note] WSREP: New cluster view: global state: 981052d1--11e8-95f8-6b4d972d0618:, view# : Primary, number of nodes: , my index: , protocol version
--17T01::59.816718+: [Note] WSREP: Setting wsrep_ready to true
--17T01::59.816731+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--17T01::59.816742+: [Note] WSREP: galera/src/replicator_smm.cpp:establish_protocol_versions():: REPL Protocols: (, )
--17T01::59.816750+: [Note] WSREP: galera/src/certification.cpp:assign_initial_position():: Assign initial position for certification: , protocol version:
--17T01::59.817024+: [Note] WSREP: galera/src/galera_service_thd.cpp:thd_func():: Service thread queue flushed.
--17T01::00.473701+: [Note] WSREP: gcs/src/gcs_group.cpp:group_select_donor():: Member 2.0 (my3-) requested state transfer from '*any*'. Selected 0.0 (my1-)(SYNCED) as donor.
--17T01::00.473778+: [Note] WSREP: gcs/src/gcs.cpp:gcs_shift_state():: Shifting SYNCED -> DONOR/DESYNCED (TO: )
--17T01::00.473899+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--17T01::00.474066+: [Note] WSREP: Initiating SST/IST transfer on DONOR side (wsrep_sst_xtrabackup-v2 --role 'donor' --address '192.168.65.130:4444/xtrabackup_sst//1' --socket '/data/mysql/mysql_3306/tmp/mysql_3306.sock' --datadir '/data/mysql/mysql_3306/data/' --defaults-file '/etc/my.cnf' --defaults-group-suffix '' --binlog '/data/mysql/mysql_3306/logs/mysql-bin' --gtid '981052d1-5931-11e8-95f8-6b4d972d0618:10')
--17T01::00.474683+: [Note] WSREP: DONOR thread signaled with
--17T01::02.735429+: [Note] WSREP: gcomm/src/gmcast.cpp:check_liveness():: (980e7263, 'tcp://0.0.0.0:4567') turning message relay requesting off
--16T17::.795663Z WSREP_SST: [INFO] Streaming the backup to joiner at 192.168.65.130
--17T01::54.344231+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_join_msg():: 0.0 (my1-): State transfer to 2.0 (my3-) complete.
--17T01::54.344293+: [Note] WSREP: gcs/src/gcs.cpp:gcs_shift_state():: Shifting DONOR/DESYNCED -> JOINED (TO: )
--17T01::54.345959+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_sync_msg():: Member 0.0 (my1-) synced with group.
--17T01::54.346015+: [Note] WSREP: gcs/src/gcs.cpp:gcs_shift_state():: Shifting JOINED -> SYNCED (TO: )
--17T01::54.346060+: [Note] WSREP: Synchronized with group, ready for connections
--17T01::54.346070+: [Note] WSREP: Setting wsrep_ready to true
--17T01::54.346080+: [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
--17T01::02.688138+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_join_msg():: 2.0 (my3-): State transfer from 0.0 (my1-) complete.
--17T01::02.689114+: [Note] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_sync_msg():: Member 2.0 (my3-) synced with group.
[root@my1- ~]#
pxc5.7配置安装的更多相关文章
- Winserver2012下mysql 5.7解压版(zip)配置安装
一.安装 下载mysqlzip版本mysql不需要运行可执行文件,解压即可,下载zip版本mysqlmsi版本mysql双击文件即可安装,相对简单,本文不介绍此版本安装 配置环境变量打开环境变量配置页 ...
- 分布式文件系统 - FastDFS 在 CentOS 下配置安装部署
少啰嗦,直接装 看过上一篇分布式文件系统 - FastDFS 简单了解一下的朋友应该知道,本次安装是使用目前余庆老师开源的最新 V5.05 版本,是余庆老师放在 Github 上的,和目前你能在网络上 ...
- 配置安装CocoPods后进行 项目基本配置
配置安装CocoPods后进行 项目基本配置总结 1)终端在文件根目录下输入 $ touch Podfile 创建一个空白的Podfile文件 2)然后在使用编辑器打开Podfile文件进行需要配置的 ...
- 【转】Ubuntu 14.04配置安装java环境和android开发环境(包括真机调试环境)
原文网址:http://my.oschina.net/HalZf/blog/347351 总要记录下过程,不然老是会忘记掉-真老了.-_-! 一.配置安装ubuntu 64位java环境: 1.下载l ...
- 基于XMPP实现的Openfire的配置安装+Android客户端的实现
最近在整理一些这方面的资料,闲话少说,咱还是直奔主题吧 :) 一.基于xmpp实现的openfire的配置安装 1. 下载最新的openfire安装文件 官方下载站点: http://www.igni ...
- 基于XMPP实现的Openfire的配置安装+Android客户端的实现[转]
最近在整理一些这方面的资料,闲话少说,咱还是直奔主题吧 :) http://blog.csdn.net/sk719887916/article/details/40541163 https://git ...
- windows2008 配置安装FTP服务器
windows2008 配置安装FTP服务器 今天在服务器上开了IIS7,但是要求把一个附件文件夹拷贝到根目录下面,这个附件文件夹有2G多大小,直接用远程桌面映射,一直都拷贝不成功,而且本地缓存越来越 ...
- oozie配置安装与原理
概述 当前开源的hadoop任务工作流管理主要有oozie和Azkaban,本文先介绍oozie的配置安装与基本运行原理. 配置安装 (参考https://segmentfault.com/a/11 ...
- eclipse下配置安装ssm图文教程(web版)
eclipse下配置安装ssm图文教程(web版) 一.安装所需jar包 1.1 mybatis安装包 可以进入GitHub的https://github.com/mybatis/mybatis-3 ...
随机推荐
- vpx
VPX 编辑 本词条缺少名片图,补充相关内容使词条更完整,还能快速升级,赶紧来编辑吧! VPX总线是VITA(VME International Trade Association, VME国际贸易协 ...
- 彻底弄懂 HTTP 缓存机制及原理 | 干货
来源:www.cnblogs.com/chenqf/p/6386163.html 前言 Http 缓存机制作为 web 性能优化的重要手段,对于从事 Web 开发的同学们来说,应该是知识体系库中的一个 ...
- Ubuntu16.04系统美化、常用软件安装等,长期更新
Ubuntu16.04系统美化.常用软件安装等,长期更新 IT之家啊 18-09-0915:00 因为我个人偏向于玩VPS.服务器之类的东西,所以一般我都是用CentOS.不过对于桌面版的Linux, ...
- 第二十二天 logging hashlib re 模块
今日内容 logging功能完善的日志模块 re正则表达式模块主要处理字符串匹配 查找 搜索给你一个字符串 要从中找到你需要的东西 爬虫大量使用 hashlib hash算法相关的库 算法怎么算不需要 ...
- POJ 2352 树状数组
学习自:链接以及百度百科 以及:https://www.bilibili.com/video/av18735440?from=search&seid=363548948825132979 理解 ...
- ajax 提交数组 泛型集合(嵌套集合)
直接上代码 后台接口: A类型中嵌套了 List<B> B类型中嵌套了 List<C> [HttpPost] public string Post(A a) { return ...
- 洛谷P2085最小函数值题解
题目 首先我们先分析一下题目范围,\(a,b,c\) 都是整数,因此我们可以得出它的函数值在\((0,+\infty )\)上是单调递增的,,然后我们可以根据函数的性质,将每个函数设置一个当前指向位置 ...
- Quartus prime 16.0 signaltap II 使用
前言 由于逻辑分析仪太贵,altera贴心提供signal tap II来观察输出波形,不过使能signaltap II会占用片内ram,毕竟原理就是把数据采样到ram中再通过jtag口上传到quar ...
- virtualenv virtualenvwrapper 虚拟环境创建
虚拟环境创建 安装 C:\Users\Python> pip install virtualenv Requirement already satisfied: virtualenv ) C:\ ...
- 【HDU - 5845】Best Division(xor-trie、01字典树、dp)
BUPT2017 wintertraining(15) #7E 题意 把数组A划分为k个区间,每个区间不超过L长度,每一个区间异或和之和为S.现在求:S不超过X,区间个数的最大值. 且A是这样给你的: ...