vim /etc/mysql/conf.d/docker.cnf
加上skip-grant-tables,这样不需要密码可以直接以root身份登录,然后重设密码
skip-grant-tables
use mysql; update mysql.user set authentication_string=password('root') where User='root';
flush privileges;