问题
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