EDIT : I should have created this post on ServerFault, wrong tab, sorry.
I'm trying to upgrade my Zabbix Server today (MySQL DB). Current version is 2.4.8, I want to update it to 3.4.4
Installation went well. When I start the zabbix-server process, the database starts upgrading, and it then stops with the following error message :
[Z3005] query failed: [1034] Incorrect key file for table 'alerts'; try to repair it [alter table alerts add p_eventid bigint unsigned]
So, I stopped zabbix-server, did the "alter table alerts add p_eventid bigint unsigned", restarted zabbix-server, and now got this error message :
[Z3005] query failed: [1060] Duplicate column name 'p_eventid' [alter table alerts add p_eventid bigint unsigned]
Which is a bit troubling for me, as the error message is different, but the proposed solution is still the same, and has been done already.
I did some research, found out this ZBX bug report that can be useful but I have no idea how to apply the workaround, as I'm no expert in SQL. As far as I can tell, I have a missing index in the alerts table (alerts_7). I tried to create it with the following command, after googling a bit :
create INDEX on alerts (p_eventid) USING BTREE;
Still got an error (the second one).
Anyone had that situation already, and found out how to solve it ?
Finally had some time to work on this, the problem was that the tmp directory was too small for the upgrade operation. After changing the tmp path in the my.cnf, and restarting the upgrade, everything worked as expected !