
表名例如叫user:
结构:
id(主键,int,递增)
name(vchar,名字)
sex(char,性别)
age(int,年龄)
建立一张这样的表就行了
进行查或者改的时候可以通过主键id来进行,
insert into mysql.user(Host,User,Password) values("localhost","abc",password("123456"))insert into mysql.user(Host,User,Password) values("localhost","abc123",password("456789"))
这个是建立用户,然后是授权,用grant命令
grant select, insert, update, delete on testdb.* to 123456
grant 权限集 on 数据库.表 to 用户
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)