mysql的基本命令操作

mysql --version  查询版本

set passwrod for 用户名@'localhost' =password('密码');  设置密码

create database 表名; 创建数据库

create table 表名(字段名 类型 [字段约束]);  创建表

desc 表名;查看表结构

drop table 表名; 删表

drop database 库名; 删库

  

猜你喜欢

转载自www.cnblogs.com/hcy-24/p/11606075.html