mysql可以使用下列命令修改密码:
首先需要登录mysql
mysql -u root -p password
#选择mysql库
mysql> use mysql;
#修改密码
mysql> update user set password=password('password') where user='root' and host='localhost';
#flush生效
mysql> flush privileges;
mysql可以使用下列命令修改密码:
首先需要登录mysql
mysql -u root -p password
#选择mysql库
mysql> use mysql;
#修改密码
mysql> update user set password=password('password') where user='root' and host='localhost';
#flush生效
mysql> flush privileges;