docker network ls
: 네트워크 확인docker network inspect <네트워크 아이디>
:자세히 확인하는 명령어docker network create springboot-mysql-net
docker run --name mysqldb -p 3306:3306 --network springboot-mysql-net -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=fisa -e MYSQL_USER=user01 -e MYSQL_PASSWORD=user01 -d mysql:latest
CREATE USER 'user01'@'localhost' identified BY 'user01';
CREATE USER 'user01'@'%' identified BY 'user01';
grant all privileges on . to 'user01'@'%';
grant all privileges on fisa.* to 'user01'@'localhost';
flush privileges;