mysql基本命令行

连接登录数据库

mysql -h 127.0.0.1 -P 3306 -u root -p123456

查看数据库

mysql> show databases;

进入数据库test

mysql> use test;

查看test数据库中所有表

mysql> show tables;

查看表student的创建语言

mysql> show create table student \g;

查看表student的字段结构

mysql> desc student;

 

posted @ 2017-06-20 08:17  鲨鱼逛大街  阅读(174)  评论(0编辑  收藏  举报