mysql修改root密码时,提示ERROR 1064 (42000)

上一篇 / 下一篇  2020-02-12 01:21:45 / 个人分类:linux

环境:CentOS7中安装docker Docker version 19.03.5, build 633a0ea
docker中的mysql版本:
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
mysql               latest              791b6e40940c        9 days ago          465MB

进入mysql容器后,使用命令修改root密码
update user set authentication_string = password('123456') where user='root';
报ERROR 1064 (42000)错误

解决方案
update user set authentication_string = password('123456') where user='root';
或者
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';

TAG:

 

评分:0

我来说两句

Open Toolbar