mysql 更改密码
update mysql.user set authentication_string=password('123456') where user='root';
提示报错密码长度问题
mysql> set global validate_password_policy=0;
mysql> set global validate_password_length=1;

mysql授权
授权用户所有权限
grant all on . to '用户'@"%" identified by "密码";
grant alter,insert,select,delete,update,create,drop on . to '用户'@"%" identified by "密码";
FLUSH PRIVILEGES;

grant update,insert,select,create,DELETE on nad.* to 'svsadmin'@"%";

授权查询权限
grant select on . to 用户@"%" identified by "密码";
撤销drop权限
revoke drop on . from '用户'@"%";

mysql查看用户列表
mysql> select host,user from mysql.user;

查询授权用户权限
show grants for 用户名;
删除账户及权限
drop user 用户名@'%';