时间:2021-07-01 10:21:17 帮助过:4人阅读
1 use mysql;//切换数据库 2 show tables;//查看表 3 //创建用户 4 create user ‘username‘@‘ipaddress‘ identified by ‘password‘; 5 //删除用户 6 drop user ‘username‘@‘ipaddress‘; 7 //重命名用户 8 rename user ‘username‘@‘ipaddress‘ to ‘username‘@‘ipaddress‘; 9 //修改密码 10 set password for ‘username‘@‘ipaddress‘ = Password(‘newpasswd‘); 11 //授权 12 grant select,insert,update on database.file to ‘alex‘@‘%‘; 13 grant all privileges on db1.t1 to ‘alex‘@‘%‘; 14 //查看权限 15 show grants for ‘username‘@‘ipaddress‘; 16 //取消权限 17 revoke 权限 on 数据库.表 from ‘username‘@‘ipaddress‘ 18 //退出mysql服务 19 eixt
MySQL
标签:ipaddr 添加 版本 服务端 for col nts 创建数据库 username