---
title: 主库手动增加数据
description: 1. 登录主库。
url: "https://www.hikunpeng.com/document/detail/zh/kunpengdbs/ecosystemEnable/MySQL/kunpengmysqlmasterslave_03_0025.html"
---

# 主库手动增加数据

1. 登录主库。
  1 /usr/local/mysql/bin/mysql -uroot -p'********' -S /data/mysql/run/mysql.sock

2. 建立数据库test。
  1 2 show databases; create database test;

3. 在数据库test中建立1张表student。
  1 2 3 use test create table student(name char(100),age int); show tables;

4. 在表student中插入1条数据。
  1 insert into student(name,age) values('David',18);

5. 查询student表中的数据。
  1 select * from student;
