During an upgrade from Cacti 1.1.10 to Cacti 1.1.20 everything goes OK apart from the below SQL query error :-
[Fail]
ALTER TABLE snmpagent_cache_textual_conventions
MODIFY COLUMN name VARCHAR(50) NOT NULL,
MODIFY COLUMN mib VARCHAR(50) NOT NULL,
MODIFY COLUMN type VARCHAR(50) NOT NULL,
PRIMARY KEY (`name`,`mib`,`type`)
I have rolled the server back (VM snapshot) for now so no harm done but any ideas how to resolve?
Cacti 1.1.10 - 1.1.20 SQL query upgrade error
Moderators: Developers, Moderators
Re: Cacti 1.1.10 - 1.1.20 SQL query upgrade error
It's a known problem, the ADD is missing
the right command should be:
ALTER TABLE snmpagent_cache_textual_conventions
MODIFY COLUMN name VARCHAR(50) NOT NULL,
MODIFY COLUMN mib VARCHAR(50) NOT NULL,
MODIFY COLUMN type VARCHAR(50) NOT NULL,
ADD PRIMARY KEY (`name`,`mib`,`type`)
the right command should be:
ALTER TABLE snmpagent_cache_textual_conventions
MODIFY COLUMN name VARCHAR(50) NOT NULL,
MODIFY COLUMN mib VARCHAR(50) NOT NULL,
MODIFY COLUMN type VARCHAR(50) NOT NULL,
ADD PRIMARY KEY (`name`,`mib`,`type`)
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Re: Cacti 1.1.10 - 1.1.20 SQL query upgrade error
ok i executed the right command in the cacti database;
or should it be done in all the databases?
or should it be done in all the databases?
Seek and you shall find, knock and it shall be opened, cry and you will find comfort, thirst and you shall be watered.
Re: Cacti 1.1.10 - 1.1.20 SQL query upgrade error
Just the cacti one
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Re: Cacti 1.1.10 - 1.1.20 SQL query upgrade error
Same problem here (after testing 0.8.8h to 1.1.20)
Solved with:
MariaDB [cacti]> ALTER TABLE snmpagent_cache_textual_conventions
-> MODIFY COLUMN name VARCHAR(50) NOT NULL,
-> MODIFY COLUMN mib VARCHAR(50) NOT NULL,
-> MODIFY COLUMN type VARCHAR(50) NOT NULL,
-> ADD PRIMARY KEY (`name`,`mib`,`type`)
-> ;
Query OK, 2 rows affected (0.51 sec)
Records: 2 Duplicates: 0 Warnings: 0
Thank you
Solved with:
MariaDB [cacti]> ALTER TABLE snmpagent_cache_textual_conventions
-> MODIFY COLUMN name VARCHAR(50) NOT NULL,
-> MODIFY COLUMN mib VARCHAR(50) NOT NULL,
-> MODIFY COLUMN type VARCHAR(50) NOT NULL,
-> ADD PRIMARY KEY (`name`,`mib`,`type`)
-> ;
Query OK, 2 rows affected (0.51 sec)
Records: 2 Duplicates: 0 Warnings: 0
Thank you
cacti rulez!
Re: Cacti 1.1.10 - 1.1.20 SQL query upgrade error
Fixed in 1.1.21
Before history, there was a paradise, now dust.
Who is online
Users browsing this forum: No registered users and 4 guests