도커 공식 홈
해당 홈에서 운영체제에 맞게 설치
이후 mariaDB 설치 커맨드
커맨드 창에서
docker pull mariadb
PS C:\Users\devyun> docker pull mariadb Using default tag: latest latest: Pulling from library/mariadb 43f89b94cd7d: Pull complete db915624f10a: Pull complete bfad94d59a27: Pull complete 598fd32a3b01: Pull complete 86b7c589cbd3: Pull complete b9400913ff3d: Pull complete da9eaee49d0d: Pull complete e6cb178b3bca: Pull complete Digest: sha256:c222be005ac3f8183dd3c7d1930aebbc4cd8d05d42ba92578174b7a77123efa8 Status: Downloaded newer image for mariadb:latest docker.io/library/mariadb:latest What's Next? View a summary of image vulnerabilities and recommendations → docker scout quickview mariadb
docker run --name mariadb -d -p 3306:3306 --restart=always -e MYSQL_ROOT_PASSWORD=root mariadb
docker exec -it mariadb /bin/bash
mariadb -u root -p
PS C:\Users\devyun> docker run --name mariadb -d -p 3306:3306 --restart=always -e MYSQL_ROOT_PASSWORD=root mariadb
cfc3f3b049cbb2b85b39ea40e0a1f2be672fa4f4b385f2781f860e51129e9853
PS C:\Users\devyun> docker exec -it mariadb /bin/bash
root@cfc3f3b049cb:/# mariadb -u root -p
비밀번호는 root로 설정했기때문에 root 입력
Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3 Server version: 11.2.2-MariaDB-1:11.2.2+maria~ubu2204 mariadb.org binary distribution Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>