mysql版本:mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz
percona-xtrabackup版本:percona-xtrabackup-2.4.2-Linux-x86_64.tar
1.Xtrabackup是由percona提供的mysql数据库备份工具,
特点:
(1)备份过程快速、可靠;
(2)备份过程不会打断正在执行的事务;
(3)能够基于压缩等功能节约磁盘空间和流量;
(4)自动实现备份检验;
(5)还原速度快;
2.为什么不使用mysqldump:
Mysqldump是mysql自带的,支持逻辑备份,将需要备份内容存为SQL语句保存文件扩展名为.sql. 由于mysqldump恢复时是执行.sql文件的sql语句,在数据库容量大时恢复非常慢。
安装:
上传安装包到数据库所在服务器:
[root@redhat6 opt]# ll
-rw-r--r-- 1 root root 5181160 12月 12 01:06 MySQL-shared-compat-5.6.36-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 root root 81005767 12月 12 00:53 percona-xtrabackup-2.4.2-Linux-x86_64.tar.gz
-rw-r--r-- 1 root root 137008 12月 12 01:06 perl-DBD-MySQL-4.013-3.el6.x86_64.rpm
-rw-r--r-- 1 root root 721964 12月 12 01:06 perl-DBI-1.609-4.el6.x86_64.rpm
[root@redhat6 opt]# rpm -ivh MySQL-shared-compat-5.6.36-1.linux_glibc2.5.x86_64.rpm
[root@redhat6 opt]# rpm-ivh perl-DBD-MySQL-4.013-3.el6.x86_64.rpm
[root@redhat6 opt]# rpm -ivh perl-DBI-1.609-4.el6.x86_64.rpm
[root@redhat6 opt]# tar zxvf percona-xtrabackup-2.4.2-Linux-x86_64.tar.gz
[root@redhat6 opt]# mv percona-xtrabackup-2.4.2-Linux-x86_64 xtrabackup
[root@redhat6 opt]# cd xtrabackup/
[root@redhat6 xtrabackup]# ln -sv /opt/xtrabackup/bin/* /usr/local/sbin/
"/usr/local/sbin/innobackupex" -> "/opt/xtrabackup/bin/innobackupex"
"/usr/local/sbin/xbcloud" -> "/opt/xtrabackup/bin/xbcloud"
"/usr/local/sbin/xbcloud_osenv" -> "/opt/xtrabackup/bin/xbcloud_osenv"
"/usr/local/sbin/xbcrypt" -> "/opt/xtrabackup/bin/xbcrypt"
"/usr/local/sbin/xbstream" -> "/opt/xtrabackup/bin/xbstream"
"/usr/local/sbin/xtrabackup" -> "/opt/xtrabackup/bin/xtrabackup"
#创建最小权限备份用户 bkpuser ##如果有其它用户可以使用就不用再创建用户了,用户需要用此权限。
[root@redhat6 xtrabackup]# mysql -uroot -ppassword
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 69
Server version: 5.6.30 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> CREATE USER 'bkpuser'@'localhost' IDENTIFIED BY 's3cret';
Query OK, 0 rows affected (0.00 sec)
mysql> REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bkpuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'bkpuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
[root@redhat6 xtrabackup]# mkdir -pv /data/backup # 创建备份目录
mkdir: 已创建目录 "/data"
mkdir: 已创建目录 "/data/backup"
编辑备份脚本:
[root@redhat6 xtrabackup]# vim /home/mysqlbak.sh
[root@redhat6 home]# cat mysqlbak.sh
#!/bin/bash
#使用percona-xtrabackup备份数据库
#备份存放路径
bk_dir=/data/backup
#备份数据库文件并打包
/usr/local/sbin/innobackupex --user=bkpuser --password=s3cret --stream=tar $bk_dir | gzip > $bk_dir/`date +%F_%H-%M-%S`.tar.gz
# 删除5天之后的备份
find $bk_dir/* -mtime +6 -exec rm -fr {} \; > /dev/null 2>&1
添加到crontab里,每晚1点运行
[root@redhat6 xtrabackup]# crontab -e
no crontab for root - using an empty one
crontab: installing new crontab
[root@redhat6 xtrabackup]# crontab -l
0 1 * * * sh /home/mysqlbak.sh >/dev/null 2>&1
[root@redhat6 xtrabackup]#
测试脚本运行:
[root@redhat6 home]# /bin/bash /home/mysqlbak.sh
171212 02:42:16 innobackupex: Starting the backup operation
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
171212 02:42:16 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;port=3306;mysql_socket=/data/mysql/run/mysql.sock' as 'bkpuser' (using password: YES).
171212 02:42:16 version_check Connected to MySQL server
171212 02:42:16 version_check Executing a version check against the server...
171212 02:42:16 version_check Done.
171212 02:42:16 Connecting to MySQL server host: localhost, user: bkpuser, password: set, port: 3306, socket: /data/mysql/run/mysql.sock
Using server version 5.6.30-log
/usr/local/sbin/innobackupex version 2.4.2 based on MySQL server 5.7.11 Linux (x86_64) (revision id: 8e86a84)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /data/mysql/data/
xtrabackup: open files limit requested 65535, set to 65535
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_data_home_dir = /data/mysql/log/iblog
xtrabackup: innodb_data_file_path = ibdata1:32M;ibdata2:16M:autoextend
xtrabackup: innodb_log_group_home_dir = /data/mysql/log/iblog
xtrabackup: innodb_log_files_in_group = 4
xtrabackup: innodb_log_file_size = 104857600
xtrabackup: using O_DIRECT
InnoDB: Number of pools: 1
171212 02:42:16 >> log scanned up to (1637783)
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 2 for mysql/innodb_index_stats, old maximum was 0
171212 02:42:16 [01] Streaming /data/mysql/log/iblog/ibdata1
171212 02:42:17 >> log scanned up to (1637783)
171212 02:42:17 [01] ...done
171212 02:42:17 [01] Streaming /data/mysql/log/iblog/ibdata2
171212 02:42:18 [01] ...done
171212 02:42:18 [01] Streaming ./mysql/innodb_index_stats.ibd
171212 02:42:18 [01] ...done
171212 02:42:18 [01] Streaming ./mysql/slave_relay_log_info.ibd
171212 02:42:18 [01] ...done
171212 02:42:18 [01] Streaming ./mysql/slave_worker_info.ibd
171212 02:42:18 [01] ...done
171212 02:42:18 [01] Streaming ./mysql/innodb_table_stats.ibd
171212 02:42:18 [01] ...done
171212 02:42:18 [01] Streaming ./mysql/slave_master_info.ibd
171212 02:42:18 [01] ...done
171212 02:42:18 [01] Streaming ./boke/boke_expm_maker.ibd
171212 02:42:18 [01] ...done
171212 02:42:18 [01] Streaming ./boke/boke_expm_maker_pages.ibd
171212 02:42:18 [01] ...done
171212 02:42:18 >> log scanned up to (1637783)
171212 02:42:18 Executing FLUSH NO_WRITE_TO_BINLOG TABLES...
171212 02:42:18 Executing FLUSH TABLES WITH READ LOCK...
171212 02:42:18 Starting to backup non-InnoDB tables and files
171212 02:42:19 [01] Streaming ./mysql/time_zone.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/func.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/columns_priv.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/innodb_table_stats.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_keyword.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/servers.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/plugin.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_category.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_category.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/proc.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/slave_relay_log_info.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/general_log.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/slave_worker_info.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/ndb_binlog_index.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_transition.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/proxies_priv.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/event.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/general_log.CSM to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_topic.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_name.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/slave_master_info.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_leap_second.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/servers.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/ndb_binlog_index.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_category.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/host.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/user.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_transition_type.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/columns_priv.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_transition.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_name.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/procs_priv.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/plugin.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/proxies_priv.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_keyword.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_transition_type.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/columns_priv.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_transition.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/tables_priv.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_leap_second.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_topic.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/db.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/tables_priv.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/procs_priv.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/slow_log.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/proc.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/servers.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/host.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/db.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/innodb_index_stats.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/procs_priv.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_leap_second.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_relation.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/slow_log.CSM to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/proxies_priv.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_topic.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/proc.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_relation.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/tables_priv.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/func.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_relation.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/user.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/host.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/db.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/func.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/slow_log.CSV to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/ndb_binlog_index.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/event.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/user.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/event.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/help_keyword.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/plugin.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/general_log.CSV to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./mysql/time_zone_transition_type.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_statements_summary_by_host_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_stages_summary_global_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/socket_summary_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_stages_current.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_stages_summary_by_host_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/table_io_waits_summary_by_table.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/mutex_instances.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/users.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/cond_instances.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/accounts.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/table_io_waits_summary_by_index_usage.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_statements_summary_by_user_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_statements_current.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_statements_summary_by_account_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_statements_summary_by_thread_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/setup_objects.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/file_summary_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/file_instances.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/rwlock_instances.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/session_connect_attrs.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_waits_summary_by_instance.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/setup_timers.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_stages_history_long.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/performance_timers.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_waits_current.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/socket_summary_by_instance.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_stages_summary_by_account_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_statements_history.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_waits_summary_by_host_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_waits_summary_global_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/hosts.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/threads.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/db.opt to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_statements_summary_by_digest.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/socket_instances.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_waits_summary_by_user_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/setup_actors.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/setup_instruments.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/setup_consumers.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_waits_summary_by_account_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_stages_history.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_statements_summary_global_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/file_summary_by_instance.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/objects_summary_global_by_type.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/table_lock_waits_summary_by_table.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_waits_history_long.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_stages_summary_by_thread_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_statements_history_long.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/host_cache.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/session_account_connect_attrs.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_waits_history.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_waits_summary_by_thread_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./performance_schema/events_stages_summary_by_user_by_event_name.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_users.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_links.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_expm_maker.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_posts.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_terms.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_posts.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_terms.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_links.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_term_taxonomy.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_usermeta.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_usermeta.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_comments.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_term_relationships.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_termmeta.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_termmeta.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_options.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_postmeta.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_term_relationships.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_expm_maker_pages.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_comments.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_users.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_users.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_terms.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_usermeta.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_commentmeta.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/db.opt to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_term_relationships.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_postmeta.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_options.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_term_taxonomy.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_commentmeta.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_comments.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_termmeta.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_postmeta.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_posts.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_commentmeta.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_links.MYD to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_term_taxonomy.MYI to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./boke/boke_options.frm to
171212 02:42:19 [01] ...done
171212 02:42:19 [01] Streaming ./test/db.opt to
171212 02:42:19 [01] ...done
171212 02:42:19 Finished backing up non-InnoDB tables and files
171212 02:42:19 [00] Streaming xtrabackup_binlog_info
171212 02:42:19 [00] ...done
171212 02:42:19 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
xtrabackup: The latest check point (for incremental): '1637783'
xtrabackup: Stopping log copying thread.
.171212 02:42:19 >> log scanned up to (1637783)
171212 02:42:19 Executing UNLOCK TABLES
171212 02:42:19 All tables unlocked
171212 02:42:19 Backup created in directory '/data/backup'
MySQL binlog position: filename 'master-bin.000005', position '1103'
171212 02:42:19 [00] Streaming backup-my.cnf
171212 02:42:19 [00] ...done
171212 02:42:19 [00] Streaming xtrabackup_info
171212 02:42:19 [00] ...done
xtrabackup: Transaction log of lsn (1637783) to (1637783) was copied.
171212 02:42:19 completed OK!
备份成功,查看备份的文件
[root@redhat6 backup]# ls -lh /data/backup
总用量 324K
-rw-r--r-- 1 root root 323K 12月 12 02:42 2017-12-12_02-42-16.tar.gz
---------------------------------------全量备份到此完成---------------------------------------------
删除 boke数据库 和 mysql.user表 中的sk和备份用户,然后尝试恢复一下
恢复前的准备:
[root@redhat6 backup]# tar zxvf 2017-12-12_02-42-16.tar.gz
[root@redhat6 backup]# ll
总用量 49512
-rw-r--r-- 1 root root 330328 12月 12 02:42 2017-12-12_02-42-16.tar.gz
-rw-rw---- 1 root root 433 12月 12 02:42 backup-my.cnf
drwxr-xr-x 2 root root 4096 12月 12 02:52 boke
-rw-rw---- 1 root root 33554432 12月 12 02:40 ibdata1
-rw-rw---- 1 root root 16777216 12月 12 02:40 ibdata2
drwxr-xr-x 2 root root 4096 12月 12 02:52 mysql
drwxr-xr-x 2 root root 4096 12月 12 02:52 performance_schema
drwxr-xr-x 2 root root 4096 12月 12 02:52 test
-rw-rw---- 1 root root 23 12月 12 02:42 xtrabackup_binlog_info
-rw-rw---- 1 root root 113 12月 12 02:42 xtrabackup_checkpoints
-rw-rw---- 1 root root 485 12月 12 02:42 xtrabackup_info
-rw-rw---- 1 root root 2560 12月 12 02:42 xtrabackup_logfile
[root@redhat6 backup]#
[root@redhat6 backup]# innobackupex --apply-log --use-memory=10M /data/backup/
171212 02:53:30 innobackupex: Starting the apply-log operation
IMPORTANT: Please check that the apply-log run completes successfully.
At the end of a successful apply-log run innobackupex
prints "completed OK!".
innobackupex version 2.4.2 based on MySQL server 5.7.11 Linux (x86_64) (revision id: 8e86a84)
xtrabackup: cd to /data/backup
xtrabackup: This target seems to be not prepared yet.
InnoDB: Number of pools: 1
xtrabackup: xtrabackup_logfile detected: size=8388608, start_lsn=(1637783)
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_data_home_dir = .
xtrabackup: innodb_data_file_path = ibdata1:32M;ibdata2:16M:autoextend
xtrabackup: innodb_log_group_home_dir = .
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 8388608
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_data_home_dir = .
xtrabackup: innodb_data_file_path = ibdata1:32M;ibdata2:16M:autoextend
xtrabackup: innodb_log_group_home_dir = .
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 8388608
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 10485760 bytes for buffer pool (set by --use-memory parameter)
InnoDB: PUNCH HOLE support not available
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Uses event mutexes
InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Number of pools: 1
InnoDB: Not using CPU crc32 instructions
InnoDB: Initializing buffer pool, total size = 10M, instances = 1, chunk size = 10M
InnoDB: Completed initialization of buffer pool
InnoDB: page_cleaner coordinator priority: -20
InnoDB: Highest supported file format is Barracuda.
InnoDB: The log sequence number 1637773 in the system tablespace does not match the log sequence number 1637783 in the ib_logfiles!
InnoDB: Database was not shutdown normally!
InnoDB: Starting crash recovery.
InnoDB: Doing recovery: scanned up to log sequence number 1637783 (0%)
InnoDB: Creating shared tablespace for temporary tables
InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
InnoDB: File './ibtmp1' size is now 12 MB.
InnoDB: 96 redo rollback segment(s) found. 1 redo rollback segment(s) are active.
InnoDB: 32 non-redo rollback segment(s) are active.
InnoDB: Waiting for purge to start
InnoDB: 5.7.11 started; log sequence number 1637783
xtrabackup: starting shutdown with innodb_fast_shutdown = 1
InnoDB: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number 1637802
InnoDB: Number of pools: 1
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup: innodb_data_home_dir = .
xtrabackup: innodb_data_file_path = ibdata1:32M;ibdata2:16M:autoextend
xtrabackup: innodb_log_group_home_dir = .
xtrabackup: innodb_log_files_in_group = 4
xtrabackup: innodb_log_file_size = 104857600
InnoDB: PUNCH HOLE support not available
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Uses event mutexes
InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Number of pools: 1
InnoDB: Not using CPU crc32 instructions
InnoDB: Initializing buffer pool, total size = 10M, instances = 1, chunk size = 10M
InnoDB: Completed initialization of buffer pool
InnoDB: page_cleaner coordinator priority: -20
InnoDB: Setting log file ./ib_logfile101 size to 100 MB
InnoDB: Progress in MB:
100
InnoDB: Setting log file ./ib_logfile1 size to 100 MB
InnoDB: Progress in MB:
100
InnoDB: Setting log file ./ib_logfile2 size to 100 MB
InnoDB: Progress in MB:
100
InnoDB: Setting log file ./ib_logfile3 size to 100 MB
InnoDB: Progress in MB:
100
InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
InnoDB: New log files created, LSN=1637802
InnoDB: Highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 1637900
InnoDB: Doing recovery: scanned up to log sequence number 1637909 (0%)
InnoDB: Doing recovery: scanned up to log sequence number 1637909 (0%)
InnoDB: Database was not shutdown normally!
InnoDB: Starting crash recovery.
InnoDB: Removed temporary tablespace data file: "ibtmp1"
InnoDB: Creating shared tablespace for temporary tables
InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
InnoDB: File './ibtmp1' size is now 12 MB.
InnoDB: 96 redo rollback segment(s) found. 1 redo rollback segment(s) are active.
InnoDB: 32 non-redo rollback segment(s) are active.
InnoDB: Waiting for purge to start
InnoDB: page_cleaner: 1000ms intended loop took 4205ms. The settings might not be optimal. (flushed=0 and evicted=0, during the time.)
InnoDB: 5.7.11 started; log sequence number 1637909
xtrabackup: starting shutdown with innodb_fast_shutdown = 1
InnoDB: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number 1637928
171212 02:53:42 completed OK!
########恢复备份##########
停止MySQL,清空DATADIR
[root@redhat6 backup]# mysqladmin -uroot -ppassword shutdown
Warning: Using a password on the command line interface can be insecure.
[root@redhat6 backup]# netstat -ntpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1537/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1416/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1646/master
tcp 0 0 0.0.0.0:55647 0.0.0.0:* LISTEN 1349/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1212/rpcbind
tcp 0 0 :::22 :::* LISTEN 1537/sshd
tcp 0 0 ::1:631 :::* LISTEN 1416/cupsd
tcp 0 0 ::1:25 :::* LISTEN 1646/master
tcp 0 0 :::39499 :::* LISTEN 1349/rpc.statd
tcp 0 0 :::111 :::* LISTEN 1212/rpcbind
tcp 0 0 :::80 :::* LISTEN 1684/httpd
[root@redhat6 backup]# cd /data/mysql/data
[root@redhat6 data]# rm -rf *
[root@redhat6 data]# ll
总用量 0
[root@redhat6 data]# cd ..
[root@redhat6 mysql]# ll
总用量 88
drwxr-xr-x 2 mysql mysql 4096 12月 12 02:16 bin
-rw-r--r-- 1 mysql mysql 17987 12月 12 02:16 COPYING
drwxr-xr-x 2 mysql mysql 4096 12月 12 02:58 data
drwxr-xr-x 2 mysql mysql 4096 12月 12 02:16 docs
drwxr-xr-x 3 mysql mysql 4096 12月 12 02:16 include
drwxr-xr-x 3 mysql mysql 4096 12月 12 02:16 lib
drwxr-xr-x 5 mysql mysql 4096 12月 12 02:24 log
drwxr-xr-x 4 mysql mysql 4096 12月 12 02:16 man
-rw-r--r-- 1 mysql mysql 3558 12月 12 02:22 my.cnf
-rw-r--r-- 1 mysql mysql 943 12月 12 02:22 my-new.cnf
drwxr-xr-x 10 mysql mysql 4096 12月 12 02:16 mysql-test
-rw-r--r-- 1 mysql mysql 2496 12月 12 02:16 README
drwxr-xr-x 2 mysql mysql 4096 12月 12 02:56 run
drwxr-xr-x 2 mysql mysql 4096 12月 12 02:16 scripts
drwxr-xr-x 28 mysql mysql 4096 12月 12 02:16 share
drwxr-xr-x 4 mysql mysql 4096 12月 12 02:16 sql-bench
drwxr-xr-x 2 mysql mysql 4096 12月 12 02:16 support-files
drwxr-xr-x 2 mysql mysql 4096 12月 12 02:56 tmp
[root@redhat6 mysql]# cd log/iblog
[root@redhat6 iblog]# ll
总用量 458752
-rw-rw---- 1 mysql mysql 33554432 12月 12 02:56 ibdata1
-rw-rw---- 1 mysql mysql 16777216 12月 12 02:56 ibdata2
-rw-rw---- 1 mysql mysql 104857600 12月 12 02:56 ib_logfile0
-rw-rw---- 1 mysql mysql 104857600 12月 12 02:22 ib_logfile1
-rw-rw---- 1 mysql mysql 104857600 12月 12 02:22 ib_logfile2
-rw-rw---- 1 mysql mysql 104857600 12月 12 02:22 ib_logfile3
[root@redhat6 iblog]# rm -rf *
[root@redhat6 iblog]# ll
总用量 0
--------------------------------恢复备份的数据----------------------
[root@redhat6 iblog]# innobackupex --copy-back --rsync /data/backup/
171212 03:02:14 innobackupex: Starting the copy-back operation
IMPORTANT: Please check that the copy-back run completes successfully.
At the end of a successful copy-back run innobackupex
prints "completed OK!".
innobackupex version 2.4.2 based on MySQL server 5.7.11 Linux (x86_64) (revision id: 8e86a84)
171212 03:02:14 [01] Copying ib_logfile0 to /data/mysql/log/iblog/ib_logfile0
171212 03:02:15 [01] ...done
171212 03:02:16 [01] Copying ib_logfile1 to /data/mysql/log/iblog/ib_logfile1
171212 03:02:17 [01] ...done
171212 03:02:17 [01] Copying ib_logfile2 to /data/mysql/log/iblog/ib_logfile2
171212 03:02:18 [01] ...done
171212 03:02:18 [01] Copying ib_logfile3 to /data/mysql/log/iblog/ib_logfile3
171212 03:02:20 [01] ...done
171212 03:02:20 [01] Copying ibdata1 to /data/mysql/log/iblog/ibdata1
171212 03:02:20 [01] ...done
171212 03:02:20 [01] Copying ibdata2 to /data/mysql/log/iblog/ibdata2
171212 03:02:20 [01] ...done
171212 03:02:21 [01] Copying ./mysql/time_zone.MYI to /data/mysql/data/mysql/time_zone.MYI
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/time_zone_name.frm to /data/mysql/data/mysql/time_zone_name.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/func.MYI to /data/mysql/data/mysql/func.MYI
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/columns_priv.MYD to /data/mysql/data/mysql/columns_priv.MYD
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/innodb_table_stats.frm to /data/mysql/data/mysql/innodb_table_stats.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/help_keyword.frm to /data/mysql/data/mysql/help_keyword.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/servers.MYD to /data/mysql/data/mysql/servers.MYD
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/plugin.MYD to /data/mysql/data/mysql/plugin.MYD
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/help_category.MYI to /data/mysql/data/mysql/help_category.MYI
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/help_category.MYD to /data/mysql/data/mysql/help_category.MYD
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/proc.MYD to /data/mysql/data/mysql/proc.MYD
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/slave_relay_log_info.frm to /data/mysql/data/mysql/slave_relay_log_info.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/general_log.frm to /data/mysql/data/mysql/general_log.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/slave_worker_info.frm to /data/mysql/data/mysql/slave_worker_info.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/ndb_binlog_index.MYI to /data/mysql/data/mysql/ndb_binlog_index.MYI
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/time_zone_transition.MYI to /data/mysql/data/mysql/time_zone_transition.MYI
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/proxies_priv.MYD to /data/mysql/data/mysql/proxies_priv.MYD
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/event.MYI to /data/mysql/data/mysql/event.MYI
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/general_log.CSM to /data/mysql/data/mysql/general_log.CSM
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/help_topic.MYI to /data/mysql/data/mysql/help_topic.MYI
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/time_zone_name.MYD to /data/mysql/data/mysql/time_zone_name.MYD
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/slave_master_info.frm to /data/mysql/data/mysql/slave_master_info.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/time_zone_leap_second.frm to /data/mysql/data/mysql/time_zone_leap_second.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/servers.frm to /data/mysql/data/mysql/servers.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/innodb_index_stats.ibd to /data/mysql/data/mysql/innodb_index_stats.ibd
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/ndb_binlog_index.MYD to /data/mysql/data/mysql/ndb_binlog_index.MYD
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/help_category.frm to /data/mysql/data/mysql/help_category.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/time_zone.frm to /data/mysql/data/mysql/time_zone.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/host.frm to /data/mysql/data/mysql/host.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/user.MYD to /data/mysql/data/mysql/user.MYD
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/time_zone.MYD to /data/mysql/data/mysql/time_zone.MYD
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/time_zone_transition_type.frm to /data/mysql/data/mysql/time_zone_transition_type.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/columns_priv.frm to /data/mysql/data/mysql/columns_priv.frm
171212 03:02:21 [01] ...done
171212 03:02:21 [01] Copying ./mysql/time_zone_transition.frm to /data/mysql/data/mysql/time_zone_transition.frm
171212 03:02:21 [01] ...done
171212 03:02:22 [01] Copying ./mysql/time_zone_name.MYI to /data/mysql/data/mysql/time_zone_name.MYI
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/procs_priv.frm to /data/mysql/data/mysql/procs_priv.frm
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/plugin.MYI to /data/mysql/data/mysql/plugin.MYI
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/proxies_priv.frm to /data/mysql/data/mysql/proxies_priv.frm
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/help_keyword.MYD to /data/mysql/data/mysql/help_keyword.MYD
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/time_zone_transition_type.MYI to /data/mysql/data/mysql/time_zone_transition_type.MYI
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/columns_priv.MYI to /data/mysql/data/mysql/columns_priv.MYI
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/time_zone_transition.MYD to /data/mysql/data/mysql/time_zone_transition.MYD
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/tables_priv.MYD to /data/mysql/data/mysql/tables_priv.MYD
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/time_zone_leap_second.MYI to /data/mysql/data/mysql/time_zone_leap_second.MYI
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/help_topic.frm to /data/mysql/data/mysql/help_topic.frm
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/db.MYI to /data/mysql/data/mysql/db.MYI
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/slave_relay_log_info.ibd to /data/mysql/data/mysql/slave_relay_log_info.ibd
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/tables_priv.frm to /data/mysql/data/mysql/tables_priv.frm
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/procs_priv.MYD to /data/mysql/data/mysql/procs_priv.MYD
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/slow_log.frm to /data/mysql/data/mysql/slow_log.frm
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/proc.MYI to /data/mysql/data/mysql/proc.MYI
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/servers.MYI to /data/mysql/data/mysql/servers.MYI
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/host.MYD to /data/mysql/data/mysql/host.MYD
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/db.MYD to /data/mysql/data/mysql/db.MYD
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/innodb_index_stats.frm to /data/mysql/data/mysql/innodb_index_stats.frm
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/slave_worker_info.ibd to /data/mysql/data/mysql/slave_worker_info.ibd
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/procs_priv.MYI to /data/mysql/data/mysql/procs_priv.MYI
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/innodb_table_stats.ibd to /data/mysql/data/mysql/innodb_table_stats.ibd
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/time_zone_leap_second.MYD to /data/mysql/data/mysql/time_zone_leap_second.MYD
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/help_relation.MYI to /data/mysql/data/mysql/help_relation.MYI
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/slow_log.CSM to /data/mysql/data/mysql/slow_log.CSM
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/proxies_priv.MYI to /data/mysql/data/mysql/proxies_priv.MYI
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/help_topic.MYD to /data/mysql/data/mysql/help_topic.MYD
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/proc.frm to /data/mysql/data/mysql/proc.frm
171212 03:02:22 [01] ...done
171212 03:02:22 [01] Copying ./mysql/help_relation.MYD to /data/mysql/data/mysql/help_relation.MYD
171212 03:02:22 [01] ...done
171212 03:02:23 [01] Copying ./mysql/tables_priv.MYI to /data/mysql/data/mysql/tables_priv.MYI
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/func.MYD to /data/mysql/data/mysql/func.MYD
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/help_relation.frm to /data/mysql/data/mysql/help_relation.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/user.MYI to /data/mysql/data/mysql/user.MYI
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/host.MYI to /data/mysql/data/mysql/host.MYI
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/db.frm to /data/mysql/data/mysql/db.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/func.frm to /data/mysql/data/mysql/func.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/slow_log.CSV to /data/mysql/data/mysql/slow_log.CSV
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/ndb_binlog_index.frm to /data/mysql/data/mysql/ndb_binlog_index.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/event.frm to /data/mysql/data/mysql/event.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/user.frm to /data/mysql/data/mysql/user.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/event.MYD to /data/mysql/data/mysql/event.MYD
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/help_keyword.MYI to /data/mysql/data/mysql/help_keyword.MYI
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/slave_master_info.ibd to /data/mysql/data/mysql/slave_master_info.ibd
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/plugin.frm to /data/mysql/data/mysql/plugin.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/general_log.CSV to /data/mysql/data/mysql/general_log.CSV
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./mysql/time_zone_transition_type.MYD to /data/mysql/data/mysql/time_zone_transition_type.MYD
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/events_statements_summary_by_host_by_event_name.frm to /data/mysql/data/performance_schema/events_statements_summary_by_host_by_event_name.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/events_stages_summary_global_by_event_name.frm to /data/mysql/data/performance_schema/events_stages_summary_global_by_event_name.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/socket_summary_by_event_name.frm to /data/mysql/data/performance_schema/socket_summary_by_event_name.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/events_stages_current.frm to /data/mysql/data/performance_schema/events_stages_current.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/events_stages_summary_by_host_by_event_name.frm to /data/mysql/data/performance_schema/events_stages_summary_by_host_by_event_name.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/table_io_waits_summary_by_table.frm to /data/mysql/data/performance_schema/table_io_waits_summary_by_table.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/mutex_instances.frm to /data/mysql/data/performance_schema/mutex_instances.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/users.frm to /data/mysql/data/performance_schema/users.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/cond_instances.frm to /data/mysql/data/performance_schema/cond_instances.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/accounts.frm to /data/mysql/data/performance_schema/accounts.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/table_io_waits_summary_by_index_usage.frm to /data/mysql/data/performance_schema/table_io_waits_summary_by_index_usage.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/events_statements_summary_by_user_by_event_name.frm to /data/mysql/data/performance_schema/events_statements_summary_by_user_by_event_name.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/events_statements_current.frm to /data/mysql/data/performance_schema/events_statements_current.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/events_statements_summary_by_account_by_event_name.frm to /data/mysql/data/performance_schema/events_statements_summary_by_account_by_event_name.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/events_statements_summary_by_thread_by_event_name.frm to /data/mysql/data/performance_schema/events_statements_summary_by_thread_by_event_name.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/setup_objects.frm to /data/mysql/data/performance_schema/setup_objects.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/file_summary_by_event_name.frm to /data/mysql/data/performance_schema/file_summary_by_event_name.frm
171212 03:02:23 [01] ...done
171212 03:02:23 [01] Copying ./performance_schema/file_instances.frm to /data/mysql/data/performance_schema/file_instances.frm
171212 03:02:23 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/rwlock_instances.frm to /data/mysql/data/performance_schema/rwlock_instances.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/session_connect_attrs.frm to /data/mysql/data/performance_schema/session_connect_attrs.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_waits_summary_by_instance.frm to /data/mysql/data/performance_schema/events_waits_summary_by_instance.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/setup_timers.frm to /data/mysql/data/performance_schema/setup_timers.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_stages_history_long.frm to /data/mysql/data/performance_schema/events_stages_history_long.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/performance_timers.frm to /data/mysql/data/performance_schema/performance_timers.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_waits_current.frm to /data/mysql/data/performance_schema/events_waits_current.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/socket_summary_by_instance.frm to /data/mysql/data/performance_schema/socket_summary_by_instance.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_stages_summary_by_account_by_event_name.frm to /data/mysql/data/performance_schema/events_stages_summary_by_account_by_event_name.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_statements_history.frm to /data/mysql/data/performance_schema/events_statements_history.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_waits_summary_by_host_by_event_name.frm to /data/mysql/data/performance_schema/events_waits_summary_by_host_by_event_name.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_waits_summary_global_by_event_name.frm to /data/mysql/data/performance_schema/events_waits_summary_global_by_event_name.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/hosts.frm to /data/mysql/data/performance_schema/hosts.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/threads.frm to /data/mysql/data/performance_schema/threads.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/db.opt to /data/mysql/data/performance_schema/db.opt
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_statements_summary_by_digest.frm to /data/mysql/data/performance_schema/events_statements_summary_by_digest.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/socket_instances.frm to /data/mysql/data/performance_schema/socket_instances.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_waits_summary_by_user_by_event_name.frm to /data/mysql/data/performance_schema/events_waits_summary_by_user_by_event_name.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/setup_actors.frm to /data/mysql/data/performance_schema/setup_actors.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/setup_instruments.frm to /data/mysql/data/performance_schema/setup_instruments.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/setup_consumers.frm to /data/mysql/data/performance_schema/setup_consumers.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_waits_summary_by_account_by_event_name.frm to /data/mysql/data/performance_schema/events_waits_summary_by_account_by_event_name.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_stages_history.frm to /data/mysql/data/performance_schema/events_stages_history.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_statements_summary_global_by_event_name.frm to /data/mysql/data/performance_schema/events_statements_summary_global_by_event_name.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/file_summary_by_instance.frm to /data/mysql/data/performance_schema/file_summary_by_instance.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/objects_summary_global_by_type.frm to /data/mysql/data/performance_schema/objects_summary_global_by_type.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/table_lock_waits_summary_by_table.frm to /data/mysql/data/performance_schema/table_lock_waits_summary_by_table.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_waits_history_long.frm to /data/mysql/data/performance_schema/events_waits_history_long.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_stages_summary_by_thread_by_event_name.frm to /data/mysql/data/performance_schema/events_stages_summary_by_thread_by_event_name.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_statements_history_long.frm to /data/mysql/data/performance_schema/events_statements_history_long.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/host_cache.frm to /data/mysql/data/performance_schema/host_cache.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/session_account_connect_attrs.frm to /data/mysql/data/performance_schema/session_account_connect_attrs.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_waits_history.frm to /data/mysql/data/performance_schema/events_waits_history.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_waits_summary_by_thread_by_event_name.frm to /data/mysql/data/performance_schema/events_waits_summary_by_thread_by_event_name.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./performance_schema/events_stages_summary_by_user_by_event_name.frm to /data/mysql/data/performance_schema/events_stages_summary_by_user_by_event_name.frm
171212 03:02:24 [01] ...done
171212 03:02:24 [01] Copying ./ibtmp1 to /data/mysql/data/ibtmp1
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_users.MYI to /data/mysql/data/boke/boke_users.MYI
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_links.frm to /data/mysql/data/boke/boke_links.frm
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_expm_maker.frm to /data/mysql/data/boke/boke_expm_maker.frm
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_posts.MYI to /data/mysql/data/boke/boke_posts.MYI
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_terms.frm to /data/mysql/data/boke/boke_terms.frm
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_posts.frm to /data/mysql/data/boke/boke_posts.frm
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_terms.MYI to /data/mysql/data/boke/boke_terms.MYI
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_links.MYI to /data/mysql/data/boke/boke_links.MYI
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_term_taxonomy.frm to /data/mysql/data/boke/boke_term_taxonomy.frm
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_usermeta.MYD to /data/mysql/data/boke/boke_usermeta.MYD
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_usermeta.MYI to /data/mysql/data/boke/boke_usermeta.MYI
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_comments.frm to /data/mysql/data/boke/boke_comments.frm
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_term_relationships.MYD to /data/mysql/data/boke/boke_term_relationships.MYD
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_termmeta.frm to /data/mysql/data/boke/boke_termmeta.frm
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_termmeta.MYI to /data/mysql/data/boke/boke_termmeta.MYI
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_options.MYI to /data/mysql/data/boke/boke_options.MYI
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_postmeta.frm to /data/mysql/data/boke/boke_postmeta.frm
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_term_relationships.frm to /data/mysql/data/boke/boke_term_relationships.frm
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_expm_maker.ibd to /data/mysql/data/boke/boke_expm_maker.ibd
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_expm_maker_pages.frm to /data/mysql/data/boke/boke_expm_maker_pages.frm
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_comments.MYD to /data/mysql/data/boke/boke_comments.MYD
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_users.frm to /data/mysql/data/boke/boke_users.frm
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_users.MYD to /data/mysql/data/boke/boke_users.MYD
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_terms.MYD to /data/mysql/data/boke/boke_terms.MYD
171212 03:02:25 [01] ...done
171212 03:02:25 [01] Copying ./boke/boke_usermeta.frm to /data/mysql/data/boke/boke_usermeta.frm
171212 03:02:25 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_expm_maker_pages.ibd to /data/mysql/data/boke/boke_expm_maker_pages.ibd
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_commentmeta.frm to /data/mysql/data/boke/boke_commentmeta.frm
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/db.opt to /data/mysql/data/boke/db.opt
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_term_relationships.MYI to /data/mysql/data/boke/boke_term_relationships.MYI
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_postmeta.MYI to /data/mysql/data/boke/boke_postmeta.MYI
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_options.MYD to /data/mysql/data/boke/boke_options.MYD
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_term_taxonomy.MYD to /data/mysql/data/boke/boke_term_taxonomy.MYD
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_commentmeta.MYI to /data/mysql/data/boke/boke_commentmeta.MYI
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_comments.MYI to /data/mysql/data/boke/boke_comments.MYI
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_termmeta.MYD to /data/mysql/data/boke/boke_termmeta.MYD
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_postmeta.MYD to /data/mysql/data/boke/boke_postmeta.MYD
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_posts.MYD to /data/mysql/data/boke/boke_posts.MYD
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_commentmeta.MYD to /data/mysql/data/boke/boke_commentmeta.MYD
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_links.MYD to /data/mysql/data/boke/boke_links.MYD
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_term_taxonomy.MYI to /data/mysql/data/boke/boke_term_taxonomy.MYI
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./boke/boke_options.frm to /data/mysql/data/boke/boke_options.frm
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./xtrabackup_info to /data/mysql/data/xtrabackup_info
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./test/db.opt to /data/mysql/data/test/db.opt
171212 03:02:26 [01] ...done
171212 03:02:26 [01] Copying ./2017-12-12_02-42-16.tar.gz to /data/mysql/data/2017-12-12_02-42-16.tar.gz
171212 03:02:26 [01] ...done
171212 03:02:26 completed OK!
启动MySQL ......启动前重新赋权文件权限
[root@redhat6 iblog]# chown -R mysql.mysql /data/mysql/
[root@redhat6 iblog]# service mysql start
Starting MySQL..... [确定]
[root@redhat6 iblog]# mysql -uroot -ppassword
mysql> select user,host,password from mysql.user;
+---------+-----------+-------------------------------------------+
| user | host | password |
+---------+-----------+-------------------------------------------+
| root | localhost | *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 |
| root | centos6 | *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 |
| root | % | *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 |
| ka | % | *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 |
| bkpuser | localhost | *B865CAE8F340F6CE1485A06F4492BB49718DF1EC |
+---------+-----------+-------------------------------------------+
5 rows in set (0.00 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| boke |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.02 sec)
mysql> use boke;
Database changed
mysql> show tables;
+-------------------------+
| Tables_in_boke |
+-------------------------+
| boke_commentmeta |
| boke_comments |
| boke_expm_maker |
| boke_expm_maker_pages |
| boke_links |
| boke_options |
| boke_postmeta |
| boke_posts |
| boke_term_relationships |
| boke_term_taxonomy |
| boke_termmeta |
| boke_terms |
| boke_usermeta |
| boke_users |
+-------------------------+
14 rows in set (0.00 sec)
数据恢复成功。