Mysql als Docker

Aus Roebke Wiki
Zur Navigation springen Zur Suche springen

sudo docker run --detach --name=test-mysql --env='MYSQL_ROOT_PASSWORD=**PASSWROT****' mysql
sudo docker inspect test-mysql

-> "IPAddress": ""

From the physical host, we can now access the MySQL server. Ensure the MySQL client package is installed beforehand

daniel@ubuntu-2gb-nbg1-1:~$ sudo mysql -uroot -pPASSWORT -h -P 3306
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.13 MySQL Community Server - GPL

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


docker run --detach --name nextcloud4 --link test-mysql:mysql nextcloud