启动
mysql -u root -p
进入后
# 显示有几个数据库
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
# 切换数据库
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
# 显示有几个数据表
mysql> show tables;
# 不用再切换表了 直接使用
mysql> select * from user;
alter table table_name change `t1` `t1` TIMESTAMP(6) NOT NULL default '2000-01-01 00:00:00.00001';