![](https://csdnimg.cn/release/download_crawler_static/88014841/bg5.jpg)
| id | name |
+------+------+
| 1 | shi1 |
| 2 | shi2 |
| 3 | shi3 |
| 4 | shi4 |
| 5 | shi5 |
+------+------+
mysql> quit
4.3306 实例上操作:(主)创建新的数据库和增加新的数据
[root@localhost ~]# mysql -uroot -p123 -S /data/3306/mysql.sock
mysql> create database ku1;
mysql> use ku1;
mysql> create table biao1 (id int(2),name varchar(10));
mysql> insert into biao1 values (1,'test1');
mysql> insert into biao1 values (2,'test2');
mysql> insert into biao1 values (3,'test3');
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| ku |
| ku1 |
| mysql |
| performance_schema |
| test |
+--------------------+
mysql> select * from ku1.biao1;
+------+-------+
| id | name |
+------+-------+
| 1 | test1 |
| 2 | test2 |
| 3 | test3 |
+------+-------+
mysql> quit
5.3307 实例上操作:(从)查看是否能将主库新创建的数据库和数据同步过来(结果可以)
[root@localhost ~]# mysql -uroot -p123 -S /data/3307/mysql.sock
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |