mysql 常用命令

查看
show database;
show tables;
show grants;

describe xx[表名];
创建
create database xx;
create table xx();
create user xx@localhost identified by 'xx';

使用数据库

use xx[数据库名];

赋权限
grant all privileges on xx[数据库名] to xx[用户名] identified by xx[密码];
登陆
mysql -uxx[用户名] -p;
退出
exit;

删除表

drop xx[表名];

清空表

delete form xx[表名];

posted on 2016-11-08 11:39  flovato  阅读(85)  评论(0编辑  收藏  举报

导航