$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 5.7.24-0ubuntu0.16.04.1 (Ubuntu)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database spark;
Query OK, 1 row affected (0.00 sec)
mysql> use spark;
Database changed
mysql> create table student (id int(4), name char(20), gender char(4), age int(4));
Query OK, 0 rows affected (0.17 sec)
mysql> insert into student values (1, 'Xueqian', 'F', '23');
Query OK, 1 row affected (0.01 sec)
mysql> select * from student;
+------+---------+--------+------+
| id | name | gender | age |
+------+---------+--------+------+
| 1 | Xueqian | F | 23 |
+------+---------+--------+------+
1 row in set (0.00 sec)
mysql> select * from student;
+------+-------+--------+------+
| id | name | gender | age |
+------+-------+--------+------+
| 3 | Cindy | F | 26 |
| 4 | David | M | 27 |
+------+-------+--------+------+
2 rows in set (0.00 sec)