盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

详细说明MySQL PXC构建新节点只需IST传输的方法

时间:2025/3/15作者:未知来源:盾怪网教程人气:

[摘要]+----------------+----------+--------------+------------------+-------------------+1 row in set (0....
+----------------+----------+--------------+------------------+-------------------+ 1 row in set (0.00 sec)

step2:用innobackupex备份node240数据:

[root@zejin240 mysql]# innobackupex --user=root --password=123 --port=6000 --host=127.0.0.1 
--defaults-file=/home/mysql/pxc6000.cnf /home/mysql/InnoDB Backup Utility v1.5.1-xtrabackup; 
Copyright 2003, 2009 Innobase Oyand Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.This software is published 
underthe GNU GENERAL PUBLIC LICENSE Version 2, June 1991.Get the latest version of Percona XtraBackup, documentation, and help 
resources:percona.com/xb/p160528 09:39:07 innobackupex: Executing a version check against the server...160528 09:39:07 
innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_file=/home/mysql/pxc6000.cnf;
mysql_read_default_group=xtrabackup;host=127.0.0.1;
port=6000' as 'root' (using password: YES).160528 09:39:07 innobackupex: Connected to MySQL server160528 09:39:07 
innobackupex: Done.160528 09:39:07 innobackupex: Connecting to MySQL server with DSN 'dbi:mysql:;
mysql_read_default_file=/home/mysql/pxc6000.cnf;
mysql_read_default_group=xtrabackup;host=127.0.0.1;port=6000' as 'root' (using password: YES).160528 09:39:07 
innobackupex: Connected to MySQL server160528 09:39:07 innobackupex: Starting the backup operationIMPORTANT: 
Please check that the backup run completes successfully.      
At the end of a successful backup run innobackupex      
prints "completed OK!".innobackupex: Using server version 5.6.26-74.0-25.12-loginnobackupex: 
Created backup directory /home/mysql/2016-05-28_09-39-07160528 09:39:07 innobackupex: Starting ibbackup with command: 
xtrabackup --defaults-file="/home/mysql/pxc6000.cnf" --defaults-group="mysqld" --backup 
--suspend-at-end --target-dir=/home/mysql/2016-05-28_09-39-07 --innodb_log_file_size="50331648"
 --tmpdir=/tmp --extra-lsndir='/tmp'innobackupex: Waiting for ibbackup (pid=30280) to suspendinnobackupex: 
 Suspend file '/home/mysql/2016-05-28_09-39-07/xtrabackup_suspended_2'xtrabackup 
 version 2.2.11 based on MySQL server 5.6.24 Linux (x86_64) (revision id: )xtrabackup: uses 
 posix_fadvise().xtrabackup: cd to /home/mysql/I6000xtrabackup: open files limit requested 0, set to 1024xtrabackup: 
 using the following InnoDB configuration:xtrabackup:  innodb_data_home_dir = /home/mysql/I6000xtrabackup:  
 innodb_data_file_path = ibdata1:10M:autoextendxtrabackup:  innodb_log_group_home_dir = ./xtrabackup:  
 innodb_log_files_in_group = 2xtrabackup:  innodb_log_file_size = 50331648>> log scanned up to (1637591)xtrabackup: 
 Generating a list of tablespaces[01] Copying /home/mysql/I6000/ibdata1 to /home/mysql/2016-05-28_09-39-07/ibdata1>> 
 log scanned up to (1637591)[01]    ...done[01] Copying ./zejin/t1.ibd to /home/mysql/2016-05-28_09-39-07/zejin/t1.ibd[01]   
  ...done[01] Copying ./mysql/innodb_table_stats.ibd to /home/mysql/2016-05-28_09-39-07/mysql/innodb_table_stats.ibd[01]   
   ...done[01] Copying ./mysql/slave_master_info.ibd to /home/mysql/2016-05-28_09-39-07/mysql/slave_master_info.ibd[01]   
   ...done[01] Copying ./mysql/slave_relay_log_info.ibd to /home/mysql/2016-05-28_09-39-07/mysql/slave_relay_log_info.ibd[01]    
   ...done[01] Copying ./mysql/slave_worker_info.ibd to /home/mysql/2016-05-28_09-39-07/mysql/slave_worker_info.ibd[01]   
    ...done[01] Copying ./mysql/innodb_index_stats.ibd to /home/mysql/2016-05-28_09-39-07/mysql/innodb_index_stats.ibd[01]    
    ...done>> log scanned up to (1637591)xtrabackup: Creating suspend file '/home/mysql/2016-05-28_09-39-07/xtrabackup_suspended_2' 
    with pid '30280'160528 09:39:10 innobackupex: Continuing after ibbackup has suspended160528 09:39:10 
    innobackupex: Executing LOCK TABLES FOR BACKUP...160528 09:39:10 innobackupex: Backup tables lock acquired160528 09:39:10 
    innobackupex: Starting to backup non-InnoDB tables and filesinnobackupex: in subdirectories of '/home/mysql/I6000/'
    innobackupex: Backing up files '/home/mysql/I6000//performance_schema
    /*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (53 files)>> log scanned up to (1637598)
    innobackupex: Backing up file '/home/mysql/I6000//zejin/db.opt'innobackupex: Backing up file '/home/mysql/I6000//zejin/t1.frm'
    innobackupex: Backing up files '/home/mysql/I6000//mysql/*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (74 files)160528 09:39:11
     innobackupex: Finished backing up non-InnoDB tables and files160528 09:39:11 innobackupex: Executing LOCK BINLOG FOR BACKUP...160528
      09:39:11 innobackupex: Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...160528 09:39:11 innobackupex: Waiting for log copying to 
      finishxtrabackup: The latest check point (for incremental): '1637598'xtrabackup: Stopping log copying thread..>> log scanned up
       to (1637598)xtrabackup: Creating suspend file '/home/mysql/2016-05-28_09-39-07/xtrabackup_log_copied' with pid '30280'xtrabackup:
        Transaction log of lsn (1637591) to (1637598) was copied.160528 09:39:12 innobackupex: Executing UNLOCK BINLOG160528 
        09:39:12 innobackupex: Executing UNLOCK TABLES160528 09:39:12 innobackupex: All tables unlockedinnobackupex: Backup 
        created in directory '/home/mysql/2016-05-28_09-39-07'innobackupex: MySQL binlog position: filename 'log_bin.000003', 
        position 2772160528 09:39:12 innobackupex: Connection to database server closed160528 09:39:12 innobackupex: completed OK!
[root@zejin240 2016-05-28_09-39-07]
# lltotal 75812-rw-r--r--. 1 root root   
358 May 28 09:39 backup-my.cnf-rw-r-----. 
1 root root 77594624 May 28 09:39 ibdata1drwx------. 
2 root root   4096 May 28 09:39 mysqldrwxr-xr-x. 
2 root root   4096 May 28 09:39 performance_schema-rw-r--r--. 
1 root root    20 May 28 09:39 xtrabackup_binlog_info-rw-r-----. 
1 root root    89 May 28 09:39 xtrabackup_checkpoints-rw-r--r--. 
1 root root   635 May 28 09:39 xtrabackup_info-rw-r-----. 
1 root root   2560 May 28 09:39 xtrabackup_logfiledrwx------. 
2 root root   4096 May 28 09:39 zejin

step3:此时我们在node240上再加入一些数据:


此时我们再在node240上插入一些数据:
mysql> use zejin;
mysql> insert into t1(name) values('lin');
Query OK, 1 row affected (0.06 sec)
mysql> insert into t1(name) values('liang');
Query OK, 1 row affected (0.00 sec)
mysql> select * from t1;
+----+-------+

关键词:详细说明MySQL PXC构建新节点只需IST传输的办法




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版