主从复制,从去还原,使用--master-data=1
mysqldump -F 刷新日志
flush logs 属性日志
log-bin 启用日志
innodb_file_per_table 每个表单独文件
--single-transaction 单事务的
-d 备份表结构, -t 只有数据
--flush-privileges
-f 忽略sql错误,继续执行
--quick 配合--single-transaction 使用
flush tables with read lock 给全局读锁。
mysqlbinlog --start-position=245
set sql-log_bin 0
unlock tables ;
nouuid,norecovery
innobackupex --apply-log /app/2018-02-23_11-55-57/
innobackupex --copy-back /app/2018-02-23_11-55-57/
chown mysql.mysql /var/lib/mysql
--readonly
alter table student discard tablespace ;
alter table student import tablespace;
start slave
start slave io_thread
start slave sql_thread