docker报Access denied for user 'root'@'localhost' (using password: YES)

docker进入mysql的时候报错了

Access denied for user 'root'@'localhost' (using password: YES)

解决

mysql -uroot -p123456 -h127.0.0.1 -P 3306 -D mysql

进去之后

grant all privileges on *.* to root@'%' identified by 'root123';

flush privileges;        

 

posted @ 2022-03-28 14:34  大日很忧伤  阅读(1592)  评论(0编辑  收藏  举报