반응형
    
    
    
  docker로 mysql 컨테이너 실행하기
mysql 컨테이너 실행
docker run --name mysql -e MYSQL_ROOT_PASSWORD='P@ssw0rd1!' -p 3306:3306 -d mysql:5.7mysql 컨테이너 확인
docker ps$ docker ps 
CONTAINER ID   IMAGE       COMMAND                  CREATED          STATUS          PORTS                               NAMES
9a8a0084b152   mysql:5.7   "docker-entrypoint.s…"   30 minutes ago   Up 30 minutes   0.0.0.0:3306->3306/tcp, 33060/tcp   mysqlmysql 컨테이너 접속
docker exec -it mysql bash$ docker exec -it mysql bash
bash-4.2#mysql server에 접속
mysql -u root -p$ mysql -u root -p                 
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.7.40 MySQL Community Server (GPL)
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>mysql server 엔진 버전 정보 확인
select version();mysql> select version();
+-----------+
| version() |
+-----------+
| 5.7.40    |
+-----------+
1 row in set (0.00 sec)
mysql>
728x90
    
    
  반응형
    
    
    
  '리눅스' 카테고리의 다른 글
| Apache MPM prefork와 worker의 개념 및 작동 방식 그리고 차이점 (0) | 2013.09.12 | 
|---|---|
| NGINX 설치 및 설정하는 방법 (1) | 2013.09.12 | 
| SSH 서버 설치 및 설정(sshd) (1) | 2013.09.10 | 
| [리눅스] 우분투 SquashFS 사용 방법 (0) | 2013.09.10 | 
| CentOS 7에서 X Window System 및 GNOME 데스크톱 환경을 설치하는 방법 (0) | 2013.09.10 | 
 
                  
                 
                  
                 
                  
                