centos7 xtrabackup mysql 基本测试(5)mysql 建立 测试 数据库及内容
登录
mysql -u etc -p
1234aA~1
创建数据库 名字是company
show databases ;
create database company;
在 company里面
创建表employee
use company;
DROP TABLE IF EXISTS employee;drop table if exists employee;
create table employee (id int unsigned primary key auto_increment comment 'id', name varchar(50) not null comment '名称', create_time datetime not null default current_timestamp comment '创建时间', update_time datetime not null default current_timestamp on update current_timestamp comment '更新时间'
) ENGINE=InnoDB charset=utf8 comment '测试表';DESCRIBE employee ;
在表employee中 插入内容
insert into employee(name) value ('张三');
select * from employee;insert into employee(name) value ('李四');
select * from employee;
删除命令
delete from employee where id = 3;
select * from employee ;
之后 分成两个阶段:
1个是 xtrabackup
1个是 主从