The mysql_upgrade client is now deprecated(mysql_upgrade客户机如今已经弃用)

  • 登陆数据库后执行如下命令 mysql> show databases;mysql

  • 报错 ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not existsql

  • 在网上找到的解决办法 mysql_upgrade -u root -p数据库

  • 输入后,显示以下信息:安全

The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are now done by the server.

To upgrade, please start the new MySQL binary with the older data directory. Repairing user tables is done automatically. Restart is not required after upgrade.

The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to run the server upgrade sequence on demand.

It may be possible that the server upgrade fails due to a number of reasons. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.

-----------------------------------------

mysql_upgrade客户机如今已经弃用。升级客户端如今执行的操做由服务器完成。
  
升级,请启动新的MySQL二进制旧数据目录。修复用户表是自动完成的。升级后不须要重启。
  
升级过程将自动启动运行一个新的MySQL二进制和另一个年纪大的数据目录。为了不意外升级,请使用MySQL二进制——升级=没有选项。还提供了选项,升级=力运行服务器升级需求序列。
  
有可能服务器升级失败因为不少缘由。在这种状况下,升级序列将再次在接下来的MySQL服务器开始运行。若是服务器升级失败屡次,服务器能够启动——升级=最小选项启动服务器没有执行升级顺序,从而容许用户手动纠正这个问题。

没办法,继续查服务器

得知ide

  • MySQL 8.0.16开始 mysql_upgrade 升级程序已经废弃
1、官方为何变动升级方式?

1. 升级速度更快

2. 升级更简单

3. 安全性更好

4. 减小升级步骤,方便自动化

5. 不须要重启 MySQL 6. 即插即用

 
2、新旧方式升级流程对比
在 MySQL 8.0.16 以前:



1. 关闭 MySQL,替换新的二进制 MySQL

2. 启动 MySQL,让服务器升级 DD(数据字典)表

3. 运行 mysql_upgrade,更新系统表和用户表

4. 加载新的帮助表

5. 重启 MySQL

从 MySQL 8.0.16 开始:



1. 关闭 MySQL,替换新的二进制 MySQL

2. 启动 MySQL,升级 DD(数据字典)表和系统表、用户表和帮助表

升级的时间和操做都会大幅度缩短,操做步骤也减小了不少,更方便了用户。

 
3、关于 MySQL 8.0.16 的新的升级方式
看看该如何使用新的升级姿式?

在 mysqld 额外添加了一个新的选项 --upgrade。可选值为 NONE,AUTO,MINIMAL,FORCE。

姿式是这样的:

/usr/local/mysql/bin/mysqld --upgrade=NONE

新的选项都表明什么?

**NONE:**不尝试进行升级

**AUTO:**默认选项,MySQL 进行数据字典升级和服务升级

**MINIMAL:**仅升级数据字典

**FORCE:**强制升级,相似旧的 mysql_upgrade –force

 

MySQL 8.0.16 新的升级方式,整体来讲分为2个步骤。

1. 升级数据字典(DD)

2. 服务器升级:升级 MySQL 系统表、升级用户表、升级 sys 表、升级帮助更新表

可能出现的问题:

1. 升级数据字典:原子性操做。若是操做失败,则根据目录能够回滚回来。

2.升级系统表、用户表:能够从备份还原中恢复。

我的建议,针对升级:

1. 使用新的版本,尤为是 MySQL 8.0 系列。每一个版本都有新特性,还有bug的修复,按期小版本升级会使你的 MySQL 更加稳定。

2. 阅读新版本的Release。 

3.最后,升级以前要作好备份,以便升级失败回滚使用。
相关文章
相关标签/搜索