操作步骤
1、登录MySQL
2、依次键入命令
user mysql
update mysql.user set authentication_string = password("你的密码") where user="用户名"
flush privileges
2、依次键入命令
user mysql
update mysql.user set authentication_string = password("你的密码") where user="用户名"
flush privileges
示例:
mysql> use mysql; mysql> update mysql.user set authentication_string = password("123") where user="root"; mysql> flush privileges;