Advertisement
wikumW

docker

Aug 31st, 2023
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. wikum@msi:~$ docker run -p 3306:3306 --name openmrs -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7.43 --default-authentication-plugin=mysql_native_password -h 127.0.0.1
  2. 26af5c4a04d9a4ef64b11fc486aa553c27f00d0abff964af36317bcc964a53b2
  3. wikum@msi:~$ docker ps
  4. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  5. 26af5c4a04d9 mysql:5.7.43 "docker-entrypoint.s…" 32 seconds ago Up 31 seconds 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp openmrs
  6. wikum@msi:~$ docker exec -it 26af5c4a04d9 bash
  7. bash-4.2# mysql -u root -p
  8. Enter password:
  9. Welcome to the MySQL monitor. Commands end with ; or \g.
  10. Your MySQL connection id is 3
  11. Server version: 5.7.43 MySQL Community Server (GPL)
  12.  
  13. Copyright (c) 2000, 2023, Oracle and/or its affiliates.
  14.  
  15. Oracle is a registered trademark of Oracle Corporation and/or its
  16. affiliates. Other names may be trademarks of their respective
  17. owners.
  18.  
  19. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  20.  
  21. mysql> create database openmrs;
  22. Query OK, 1 row affected (0.00 sec)
  23.  
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement