mysql设置用户登录host的权限

#======修改对应host的登陆密码======
use mysql;
update user set authentication_string=password('abcabcabc') where user='root' and Host='%';
grant all privileges on *.* to 'root'@'10.40.91.130' identified by 'abcabcabc' with grant option;

#======修改host======
update user set host="localhost" where user='bdpuser' and host='%';
update user set host="localhost" where user='bdpuser' and host='%';
update user set host="ldcdn197" where user='root' and host='%';
#mysql设置存储密码的根据其他字段进行加密
update b_user set pwd=MD5(concat('123456{',字段名,'}))

 

上一篇:SQL Sever 查询所有触发器和存储过程


下一篇:索引