代码语言:javascript复制
docker pull mysql
代码语言:javascript复制docker run --name myDockerMysql -e MYSQL_ROOT_PASSWORD=123123 -d -p 3306:3306 mysql
代码语言:javascript复制docker exec -it myDockerMysql bash
代码语言:javascript复制mysql -u root -p
代码语言:javascript复制select host,user,plugin,authentication_string from mysql.user;
代码语言:javascript复制ALTER user 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123123';
代码语言:javascript复制FLUSH PRIVILEGES;
代码语言:javascript复制select host,user,plugin,authentication_string from mysql.user;
代码语言:javascript复制exit;