赋予wgdp用户查询权限: grant select on wg_dp.* to 'wgdp'@'%' IDENTIFIED BY 'weigou123'; grant all privileges on *.* to 'yangchao'@'%' IDENTIFIED BY 'weigou123' 查询mysql其它用户权限: show grants for wgdp; 取消wgdp用户权限: revoke all on *.* from wgdp; PS:grant, revoke 用户
00x1创建新用户 通过root用户登录之后创建 创建新用户,用户名为testuser,密码为123456 : 1 grant all privileges on *.* to testuser@localhost identified by "123456" ; 设置用户testuser,可以在本地访问mysql 1 grant all privileges on *.* to testuser@localhost identified by "123456" ;