mysql的参数
-u指定用户
-p指定密码
-h指定ip,
-e‘’非交互执行一条命令

 

 

show databases; 

 看表,

show tables;

在看表之前要指定用户

use mysql(自己想切换的库); 

然后在

show tables;

 

create database 名字 ;

 

drop database 名字 ;

 
创建表

create table users (user_name char(20) not null,user_password char(30) default '',primarykey(user_name)); 

想要不用use删除表

drop table 空间名.表名;

 

describe 表名

 

desc users;

 

insert into yunjisuan.users(user_name,user_password) values('xiaohong','666666'); 

 

delete from yunjisuan.users where user_password=666666

 

update yunjisuan.users set user_password='123456'(想要改变的) where user_name='xiao'(范围); 

 

select * from yunjisuan.users; 

刷新,立即生效

flush privileges ;

给超级用户设置密码

 mysqladmin -uroot password '密码' 

 

相关文章: