mysql安装完成无法修改密码
时间:2021-07-01 10:21:17
帮助过:43人阅读
mysqladmin: connect to server at ‘localhost‘ failed
error: ‘Access denied for user ‘root‘@‘localhost‘ (using password: YES)‘
无法修改密码用 service mysqld stop
mysqld_safe --skip-grant-tables &
输入 mysql -uroot -p
回车进入>use mysql;
> update user set password=PASSWORD("newpass")whereuser="root";
更改密码为 newpassord
> flush privileges;
更新权限grant all on *.* to 用户名@"%"identified by "密码";
flush privileges;
> quit 退出
service mysqld restart
mysql -uroot -p新密码进入
mysql安装完成无法修改密码
标签:mysql 修改密码