First, to ensure network this function to access a virtual machine
And opened the virtual machine's access port mysql
Into the container
docker exec -it 容器id /bin/bash
Mysql database into the open remote access
- mysql -uroot -p
- use mysql
- update user set password_expired = "Y"where user="root";
- ALTER USER'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';