Database Fails to Upgrade

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Skip1313
Posts: 5
Joined: Sun Apr 19, 2020 7:27 pm

Database Fails to Upgrade

Post by Skip1313 »

Migrating servers while upgrading from 0.8.8 to 1.2.9.
MySQL server both at v5.7.
After restoring MySQL dump and restarting cacti, Installation Wizard fails at Database upgrade with following error:

RENAME TABLE `plugin_discover_hosts` TO `automation_devices` [Skipped]
ALTER TABLE `automation_devices` DROP `hash` [Skipped]
ALTER TABLE automation_devices ADD COLUMN id BIGINT unsigned auto_increment FIRST, ADD COLUMN network_id INT unsigned NOT NULL default '0' AFTER id, ADD COLUMN snmp_port int(10) unsigned NOT NULL DEFAULT '161' AFTER snmp_version, ADD COLUMN snmp_engine_id varchar(30) DEFAULT '' AFTER snmp_context, DROP PRIMARY KEY, ADD PRIMARY KEY(id), ADD UNIQUE INDEX ip(ip); ADD INDEX network_id(network_id), COMMENT='Table of Discovered Devices' [Fail]
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Database Fails to Upgrade

Post by TheWitness »

Did it fail because the columns were already there? What is the tables current struction:

SHOW CREATE TABLE automation_devices;
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Skip1313
Posts: 5
Joined: Sun Apr 19, 2020 7:27 pm

Re: Database Fails to Upgrade

Post by Skip1313 »

Please see attachment
Attachments
Cacti table.txt
(1.88 KiB) Downloaded 41 times
Skip1313
Posts: 5
Joined: Sun Apr 19, 2020 7:27 pm

Re: Database Fails to Upgrade

Post by Skip1313 »

You were right. Table was already there. I was not dropping the cacti DB before restoring the dump.
lumejia
Posts: 3
Joined: Sat Apr 06, 2019 10:08 am

Re: Database Fails to Upgrade

Post by lumejia »

sorry, but I did not understand how this problem was solved, could you explain
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests