Pandora FMS Community

Database issues after upgrading to 6.0; bugs in SQL proposals on DB Status page

RoBo · 30 oct 2015, 3:04 · 2 mensajes · 60 visitas

  1. Inicio del debate

    After having upgraded to 6.0 I got some SQL warnings/errors on the pandora pages. Using the DB Status feature I was able to solve that, however the database is still not fully OK. Executing following SQL results into: "An error has occured when querying the database. Can't create table 'pandora.tgis_map_has_tgis_map_con' (errno: 121) " CREATE TABLE `tgis_map_has_tgis_map_con` (   `tgis_map_id_tgis_map` int(11) NOT NULL COMMENT 'reference to tgis_map',   `tgis_map_con_id_tmap_con` int(11) NOT NULL COMMENT 'reference to tgis_map_connection',   `modification_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Last Modification Time of the Connection',   `default_map_connection` tinyint(1) DEFAULT '0' COMMENT 'Flag to mark the default map connection of a map',   PRIMARY KEY (`tgis_map_id_tgis_map`,`tgis_map_con_id_tmap_con`),   KEY `fk_tgis_map_has_tgis_map_connection_tgis_map1` (`tgis_map_id_tgis_map`),   KEY `fk_tgis_map_has_tgis_map_connection_tgis_map_connection1` (`tgis_map_con_id_tmap_con`),   CONSTRAINT `fk_tgis_map_has_tgis_map_connection_tgis_map1` FOREIGN KEY (`tgis_map_id_tgis_map`) REFERENCES `tgis_map` (`id_tgis_map`) ON DELETE CASCADE ON UPDATE NO ACTION,   CONSTRAINT `fk_tgis_map_has_tgis_map_connection_tgis_map_connection1` FOREIGN KEY (`tgis_map_con_id_tmap_con`) REFERENCES `tgis_map_connection` (`id_tmap_connection`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Table to asociate a connection to a gis map' Most of following have errors like "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'bigint(20)' at line 1" The first thing to be noticed is that the name of the column is missing in the fix, so Error Unsuccessful the field prediction_sample_window in the table tagente_modulo must be setted the type with int(10). Information You can execute this SQL query for to fix. ALTER TABLE tagente_modulo MODIFY COLUMN  int(10); should be: ALTER TABLE tagente_modulo MODIFY COLUMN dynamic_min int(10); Then there is something really bad.. The DB Status page is providing 'fix' commands that vary in type (i.e. tagente_modulo can't be int(4), int(4) unsigned and int(10) at the same time!) ALTER TABLE tagente_estado MODIFY COLUMN  bigint(20); ALTER TABLE tagente_estado MODIFY COLUMN INT NOT NULL; ALTER TABLE tagente_modulo MODIFY COLUMN  int(4); ALTER TABLE tagente_modulo MODIFY COLUMN  int(4) unsigned; ALTER TABLE tagente_modulo MODIFY COLUMN  int(10); ALTER TABLE tevent_filter MODIFY COLUMN  int(10); ALTER TABLE tevent_filter MODIFY COLUMN  int(10); ALTER TABLE tgraph_source MODIFY COLUMN  varchar(150); ALTER TABLE tgrupo MODIFY COLUMN  varchar(45); ALTER TABLE tlayout_data MODIFY COLUMN  int(10) unsigned; ALTER TABLE tlayout_data MODIFY COLUMN INT NOT NULL; ALTER TABLE tlayout_data MODIFY COLUMN  varchar(200); ALTER TABLE tmodule_relationship MODIFY COLUMN INT NOT NULL; ALTER TABLE tnetwork_map ADD COLUMN id_tag text; ALTER TABLE tperfil MODIFY COLUMN  tinyint(1); ALTER TABLE tusuario MODIFY COLUMN  tinyint(1) unsigned; ALTER TABLE tusuario MODIFY COLUMN INT NOT NULL; Theses statementes where executed fine: ALTER TABLE tperfil ADD COLUMN map_view text; ALTER TABLE tnetwork_map ADD COLUMN store_group text; ALTER TABLE tperfil ADD COLUMN map_edit text; ALTER TABLE tperfil ADD COLUMN map_management text; ALTER TABLE tperfil ADD COLUMN vconsole_view text; ALTER TABLE tperfil ADD COLUMN vconsole_edit text; ALTER TABLE tperfil ADD COLUMN vconsole_management text; ALTER TABLE ttag_module ADD COLUMN id_policy_module text; But then there are these kind of errors: "Unsuccessful the field map_view in the table tperfil must be setted the default value as 0." Here the problem is caused that the default values should be specified to the table defenition, but this hasn't be specified. It would be nice if the DB Status page also would include this in the proposals.. Oh btw.. I was expecting dynamic dashboard feature, because this is mentioned on this page http://blog.pandorafms.org/new-dashboards-feature-2/ On other location I see that this is stated to be released within 6.1? What is true?

  2. Hello RoBo, The problems you have been fighting with, are because you didn't do the migration of the database. I'm giving you a link from the Pandora's Wiki so you can follow the instructions. If it doesn't work for you or you have some other problem, lemme' know, I'll try to help you ;) Link form the Wiki -> http://wiki.pandorafms.com/index.php?title=Pandora:Pandora\_Upgrade About the dynamic dashboard, as you said, it's going to be released with the 6.1 version :( It's been some improvements on this release, but the dynamic one will come out at the next one ;) Regards, Emilio.

Entra en tu cuenta para publicar.