此时当前窗口是无法做任何操作了,以是需要复制一个当前窗口,在新窗口中进入mysql系统便不需要暗码了,然后在里面用表方式修改暗码并刷新即可:
update mysql.user set password=password('新暗码') where user='root' and host='localhost'; 然后刷新:flush privileges;
不带暗码:grant p1(权限),p2,p3,... on 库.表 to 用户@IP(能登陆该用户ip) ;
带暗码:grant p1(权限),p2,p3,... on 库.表 to 用户@IP(能登陆该用户ip) identified by '暗码';
此中,假如想要所有权限(p)则使用all或all privileges ,所有库和所有表使用 *
查察可使用权限(p),show privileges;
grant 创建带暗码用户
创建一个用户,权限只有select,能使用aa库中的所有表,只能200登陆,暗码为redhait
grant 权限 on aa.* to 用户@ip identified by '暗码';