数据准备
- 在物理机上部署MySQL,启动后登录到数据库中。
- 假设本文MySQL所在服务器IP地址为192.168.200.56,端口为3306,我们需要创建三个数据库dbtest1、dbtest2、dbtest3,创建两张表tb1、tb2。
- 创建dbtest1。
1 2 3
drop database if exists dbtest1; create database dbtest1; use dbtest1;
- 在dbtest1上创建tb1。
1 2 3
create table tb1( id int not null, gmt datetime);
- 创建dbtest2。
1 2 3
drop database if exists dbtest2; create database dbtest2; use dbtest2;
- 在dbtest2上创建tb2。
1 2 3
create table tb2( id int not null, val varchar(256));
- 创建dbtest3。
1 2 3
drop database if exists dbtest3; create database dbtest3; use dbtest3;
- 在dbtest3上创建tb2。
1 2 3
create table tb2( id int not null, val varchar(256));
- 创建dbtest1。
- 退出数据库。
1
\q
父主题: 运行Cobar