我想将 MySQL 服务器从 升级8.0.3
到8.0.14
. 我遵循了以下步骤:
启动一个 8.0.3 版本的 mysql 容器
$ docker run --rm --name=tmp1 -e MYSQL_ROOT_PASSWORD=root -v $PWD/Desktop/mysql-debug/:/var/lib/mysql mysql:8.0.3
运行容器后,
$ docker exec -it tmp1 mysql -uroot -proot -e "select 1;" mysql: [Warning] Using a password on the command line interface can be insecure. +---+ | 1 | +---+ | 1 | +---+ $ docker exec -it tmp1 mysql -uroot -proot -e "show databases;" mysql: [Warning] Using a password on the command line interface can be insecure. +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ $ docker exec -it tmp1 mysql -uroot -proot -e "create database abc;" mysql: [Warning] Using a password on the command line interface can be insecure. $ docker exec -it tmp1 mysql -uroot -proot -e "show databases;" mysql: [Warning] Using a password on the command line interface can be insecure. +--------------------+ | Database | +--------------------+ | abc | | information_schema | | mysql | | performance_schema | | sys | +--------------------+
删除前一个并运行一个版本为 8.0.14 的新容器,并使用与 8.0.3 相同的数据目录(
$PWD/Desktop/mysql-debug/:/var/lib/mysql
)$ docker rm -f <mysql_container_id> $ docker run --rm --name=tmp1 -e MYSQL_ROOT_PASSWORD=root -v $PWD/Desktop/mysql-debug/:/var/lib/mysql mysql:8.0.14
但是,我收到以下错误:
$ docker run --rm --name=tmp1 -e MYSQL_ROOT_PASSWORD=root -v $PWD/Desktop/mysql-debug/:/var/lib/mysql mysql:8.0.14
2020-01-21T07:38:53.346774Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-01-21T07:38:53.346846Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.14) starting as process 1
2020-01-21T07:38:55.793052Z 1 [ERROR] [MY-013326] [Server] Upgrading the server from server version '0' is not supported.
2020-01-21T07:38:55.793067Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2020-01-21T07:38:55.793257Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2020-01-21T07:38:55.793504Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-01-21T07:38:56.513813Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.14) MySQL Community Server - GPL.
我需要做些什么来克服这个问题。任何帮助将不胜感激。