CentOS yum 升级mysql8.0.16到mysql8.0.17

在MySQL 8中mysql_upgrade客户端现已弃用。升级客户端执行的操作现在由服务器完成。
要升级,请使用较旧的数据目录启动新的 MySQL 二进制文件。自动修复用户表。升级后不需要重新启动。
升级过程自动开始运行具有旧数据目录的新 MySQL 二进制文件。为避免意外升级,请将 --升级_NONE 选项与 MySQL 二进制文件一起使用。选项 --升级_FORCE 还提供了按需运行服务器升级序列。
服务器升级可能由于多种原因而失败。在这种情况下,升级序列将在下一个 MySQL 服务器启动期间再次运行。如果服务器升级反复失败,可以使用 --upgrade_MINIMAL 选项启动服务器,无需执行升级序列,从而允许用户手动纠正问题。

 

SELECT VERSION();

VERSION()|
---------|
8.0.16   |

SET GLOBAL innodb_fast_shutdown=0

systemctl stop mysqld

wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

rpm -ivh mysql80-community-release-el7-3.noarch.rpm

yum update

systemctl start mysqld

mysql_upgrade -u root -p

[root@mysql8 ~]# mysql_upgrade -u root -p
Enter password:
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.
[root@mysql8 ~]#

 

#systemctl restart mysqld

SELECT VERSION();

VERSION()|
---------|
8.0.17   |

 

 

 

你可能感兴趣的:(CentOS yum 升级mysql8.0.16到mysql8.0.17)