Why can't I upgrade MySQL in Xampp?

﹥>﹥吖頭↗ 提交于 2021-01-27 07:19:13

问题


I followed this guide https://superuser.com/a/860604

However, when I run mysql it fall and get me error:

2017-12-15 12:24:58 10592 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'min_value' at position 3 to have type varbinary(255), found type varchar(255).

2017-12-15 12:24:58 10592 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'max_value' at position 4 to have type varbinary(255), found type varchar(255).

What's going wrong?


回答1:


This might be old, but this should help most people troubling right now. I'm also moving from MariaDB 10.1.x (provided default by XAMPP), and upgrading to MariaDB 10.2.18(their latest version of 10.2.x).

Assuming you done correctly, until line 9 from your source.

Then simply comment this in mysql/bin/my.ini

#innodb_additional_mem_pool_size = 2M

Hope this helps




回答2:


The database "mysql" schema may have changed after the upgrade. mysql expects two colums to be of different type.

Dump mysql database as backup and change those columns:

alter table `column_stats` drop column `min_value`;
alter table `column_stats` drop column `max_value`;
alter table `column_stats` add column `min_value` varbinary(255) DEFAULT NULL AFTER `column_name`;
alter table `column_stats` add column `max_value` varbinary(255) DEFAULT NULL AFTER `min_value`;



回答3:


What worked for me was

use mysql;
alter table column_stats modify column max_value varbinary(255);
alter table column_stats modify column min_value varbinary(255);

That changed the error message to

InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade

So I ran mysql_upgrade and everything seems normal again.



来源:https://stackoverflow.com/questions/47831725/why-cant-i-upgrade-mysql-in-xampp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!