docker 安装mysql
sudo docker pull mysql
sudo docker run --name pwc-mysql -e MYSQL_ROOT_PASSWORD=123456 -p 3306:3306 -d mysql
问题:使用native链接出现的问题
解决方法:docker ps 找到mysql容器ID
docker exce -it mysql容器ID bash
mysql -u root -p 回车
输入密码
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';回车
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';回车