---
title: 数据准备
description: "1. 在物理机上部署MySQL，启动后登录到数据库中。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdbs/ecosystemEnable/MySQL/kunpengcobar_04_0010.html
sourcePath: /source/zh/kunpengdbs/ecosystemEnable/MySQL/kunpengcobar_04_0010.html
indexId: 398a44c324850677e5f262bc825633fd92c7e854ded48a78b48d0ffda06aec2669
---
# 数据准备

1. 在物理机上部署MySQL，启动后登录到数据库中。
2. 假设本文MySQL所在服务器IP地址为192.168.200.56，端口为3306，我们需要创建三个数据库dbtest1、dbtest2、dbtest3，创建两张表tb1、tb2。

  a. 创建dbtest1。
    1 2 3 drop database if exists dbtest1; create database dbtest1; use dbtest1;

  b. 在dbtest1上创建tb1。
    1 2 3 create table tb1( id int not null, gmt datetime);

  c. 创建dbtest2。
    1 2 3 drop database if exists dbtest2; create database dbtest2; use dbtest2;

  d. 在dbtest2上创建tb2。
    1 2 3 create table tb2( id int not null, val varchar(256));

  e. 创建dbtest3。
    1 2 3 drop database if exists dbtest3; create database dbtest3; use dbtest3;

  f. 在dbtest3上创建tb2。
    1 2 3 create table tb2( id int not null, val varchar(256));

3. 退出数据库。
  1 \q
