我正在 Windows 10 上将 MySQL 服务器 5.067 升级到 5.5.60。
我停止了服务,将 bin 替换为共享目录并启动了服务。
服务启动失败并显示消息(在事件查看器中):
Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
For more information, see Help and Support Center at http://www.mysql.com.
好的,所以我使用以下命令以管理员身份打开了 cmd:
mysql_upgrade --port 64202
结果:
Looking for 'mysql.exe' as: C:\Program Files (x86)\XXX\MySQLServer\bin\mysql.exe
Looking for 'mysqlcheck.exe' as: C:\Program Files (x86)\XXX\MySQLServer\bin\mysqlcheck.exe
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed
MySQL 升级的设计是通过 TCP 连接到 MySQL 来运行升级,但是如果服务没有运行,它怎么可能工作呢?这是一个恶性循环 - MySQL 服务需要升级才能启动,而 mysql_upgrade 需要连接到正在运行的服务。
怎么了?