Docker Desktop安装以及MYSQL, GRAFANA安装

目录

安装Docker Desktop

拉取MYSQL, GRAFANA镜像

运行Grafana容器

 运行MySQL容器

 登录MySQL

Windows PowerShell登录Container


安装Docker Desktop

下载Docker DesktopMOST COMMONhttps://www.docker.com/products/docker-desktop/

根据操作系统,选择版本即可,双击完成安装。

安装完成后,Sign up Docker Hub账号,并登录。

拉取MYSQL, GRAFANA镜像

Docker Desktop安装以及MYSQL, GRAFANA安装_第1张图片

运行Grafana容器

docker run -d --name=grafana -e TZ=Asia/Shanghai -p 3000:3000 grafana/grafana

 运行MySQL容器

D:\ryan\ucenter_program1.0换成实际的可用目录,用来给容器内部提供文件。

docker run --name mysql –v D:\ryan\ucenter_program1.0\mysql:/tmp -p 33060:3306 -e TZ=Asia/Shanghai -e MYSQL_ROOT_PASSWORD=root123 -d mysql:latest

 登录MySQL

 查看Docker Desktop - Containers,并打开容器控制台终端

Docker Desktop安装以及MYSQL, GRAFANA安装_第2张图片


sh-4.4# mysql -u root -p
# 输入密码 root123,参见上面密码设置
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.30 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>

Windows PowerShell登录Container

 docker exec -it mysql /bin/bash

Docker Desktop安装以及MYSQL, GRAFANA安装_第3张图片

 开源MYSQL连接客户端

HeidiSQL - MariaDB, MySQL, MSSQL, PostgreSQL and SQLite made easyHeidiSQL is a free and powerful client for MariaDB, MySQL, Microsoft SQL Server, PostgreSQL and SQLitehttps://www.heidisql.com/

你可能感兴趣的:(K8S,docker,容器,运维)