标签:
创建用户并授权和改密码:
grant all privileges on *.* to root@‘%‘ identified by ‘123456‘ with grant option;
*9FB2126F7514B6AF42B20E9E4B8E839B72E31
方法一:
#msyqladmin -uroot password nwepassword
#mysqladmin -uroot password oldpassword newpassword
方法二:
create user root1@‘localhost‘;
set password for root@‘%‘=password("123456");
set password=password("123456");
方法三:
update mysql.user set password=password("123456") where user=‘root‘ and host=‘%‘;
updata mysql.user set password="*9FB2126F7514B6AF42B20E9E4B8E839B72E31" where user=‘root‘ and host=‘%‘;
刷新权限:
flush privileges;
mysql5.6 授权
密码不能和其他用户重复,否则无法登陆。
mysql多种方法修改密码----5.6的坑
标签:
原文地址:http://www.cnblogs.com/fanxuanhui/p/5870158.html