
[docker-mysql_5.7.24_2020_8_27.tar]
需要搭建 maven的机器
用户名 拥有docker权限的用户 (cjpt,alarm 都可以)
路径:/home/cjpt/temp/
| 服务名称 | 升级前版本号 | 升级后版本号 |
|---|---|---|
| mysql | 2.16.6 |
docker-nexus 镜像
#### 进入安装目录
cd /home/cjpt/temp/
#### 进入安装目录
docker load < mysql.tar
version: "3"
services:
mysql:
image: docker-registry:5000/mysql:3.0
container_name: mysql
hostname: 192.168.1.64
restart: always
privileged: true
working_dir: /root
environment:
- profile=""
volumes:
- /docker/software/mysql/data:/data/mysql3306/data
- /docker/software/mysql/log:/data/mysql3306/log
- /docker/software/mysql/config:/data/mysql3306/config
expose:
- "22"
- "3306"
ports:
- "34522:22"
- "3306:3306"
| 服务名称 | 升级前版本号 | 升级后版本号 | 是否符合预期 |
|---|---|---|---|
| docker-mysql | 3.0 | 镜像 3.5 mysql版本5.7.24 | 是 |
docker ps
450b5fee4f73 docker-registry:5000/mysql:3.5 "/bin/sh /root/start…"
27 minutes ago Up 27 minutes
0.0.0.0:3306->3306/tcp, 0.0.0.0:34522->22/tcp mysql
up 表示成功
docker exec -it mysql mysql -uremote -premote123-HITOTEK (-u+用户名 -p+密码)
[root@docker-master ~]# docker exec -it mysql mysql -uremote -premote1234-HITOTEK
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 2
Server version: 5.7.31 MySQL Community Server (GPL)
Copyright (c) 2000, 2020, 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
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> ^C

这个地方描述升级可能会碰到的问题,以及解决方法
解决方式:。。。。。。。