1.Mysql數(shù)據(jù)庫(kù)操作
1.1連接mysql數(shù)據(jù)庫(kù)
Mysql - u 用戶名 - p 密碼
1.2查看數(shù)據(jù)庫(kù)
Show databases;
1.5 查看數(shù)據(jù)庫(kù)里的所有表

1.3創(chuàng)建mysql數(shù)據(jù)庫(kù)
Create database 數(shù)據(jù)庫(kù)名;

1.4 刪除mysql數(shù)據(jù)庫(kù)
Drop database 數(shù)據(jù)庫(kù)名

1.5 查看數(shù)據(jù)庫(kù)里的所有表

2.mysql表操作
2.1創(chuàng)建表
mysql> create table student(id int,name varchar(20));
Query OK, 0 rows affected (0.01 sec)
2.2 表插入數(shù)據(jù)
mysql> insert into student values(1,'aaa');
Query OK, 1 row affected (0.00 sec)
2.3 查詢表數(shù)據(jù)
mysql> select*from student;
+------+------+ | id | name |
+------+------+ | 1 | aaa |
+------+------+
1 row in set (0.00 sec)
2.4 刪除表中數(shù)據(jù)
mysql> delete from student where id='1';
Query OK,
1 row affected (0.01 sec)
mysql> select*from student;
Empty set (0.00 sec)