无法将 MySQL 从 8.0.3 升级到 8.0.14

Posted

技术标签:

【中文标题】无法将 MySQL 从 8.0.3 升级到 8.0.14【英文标题】:Fail to upgrade MySQL from 8.0.3 to 8.0.14 【发布时间】:2020-05-07 05:49:43 【问题描述】:

我想将 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.

我需要做些什么来克服这个问题。任何帮助将不胜感激。

【问题讨论】:

【参考方案1】:

不支持从 MySQL 8.0.3 升级到 8.0.14。我从here 找到了更多关于MySQl 升级过程的信息

【讨论】:

以上是关于无法将 MySQL 从 8.0.3 升级到 8.0.14的主要内容,如果未能解决你的问题,请参考以下文章

centos 5.7 之前的服务器无法升级到 8.0。服务器启动失败

将MySQL版本从5.7升级到8.0的操作过程和注意事项

从 MySQL 5.6 升级到 MySQL 8.0,Facebook 付出了什么代价?

MySQL5.7升级到8.0过程详解

MySQL5.7升级到8.0过程详解

从MySQL 5.6升级到8.0,Facebook付出了惨痛代价……