MariaDB configuration problems

V2 error reports
SP9ALX
Novice Class
Posts: 3
Joined: 03 May 2023, 22:25

MariaDB configuration problems

Post by SP9ALX »

Hi,

I'm trying to configure LOG4OM 2.27.1.0 (Windows 10) to use external database, which is MariaDB 11.2.

First, I created user in MariaDB with "ALL PRIVILEGES" grants to DB "log4om". After that, I created .sql file with "Deploy MySQL database" section in LOG4OM, trimmed it to not include user deletion and creation and finally applied this file to DB on server, which created database.

Problem is, that after filling all details in configuration, test connection fails with "Database seems not valid" error, and following entry in log:

Code: Select all

2023-05-03 22:08:38.6723 ERROR:       [DbMysql][Connect] : [EXCEPTION] Nie można rzutować z elementu DBNull na inne typy. System.InvalidCastException: Nie można rzutować z elementu DBNull na inne typy.
   w System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider)
   w System.Convert.ToInt32(Object value, IFormatProvider provider)
   w MySql.Data.MySqlClient.Driver.LoadCharacterSets(MySqlConnection connection)
   w MySql.Data.MySqlClient.Driver.Configure(MySqlConnection connection)
   w MySql.Data.MySqlClient.MySqlConnection.Open()
   w L4ONG.DAL.MYSQL.DbMysql.Connect(Boolean dje_zPLL8RUVD_ejd)
2023-05-03 22:08:38.6733 WARN:        [DatabaseManagement][TestConnection] : Connection not valid 
It's in Polish, but it translates to something like "DBNull cannot be cast to other types".

I've read about problems with MariaDB and LOG4OM and tried to recreate needed tables and DB with "CHARACTER SET utf8mb4" in place of utf8 which LOG4OM puts in .sql file by default, but it didn't help.

MariaDB general log shows following query when trying to connect from LOG4OM:

Code: Select all

230504  0:03:47     42 Connect  log4om@<IP> on log4om using TCP/IP
                    42 Query    SELECT @@max_allowed_packet, @@character_set_client,
        @@character_set_connection, @@license, @@sql_mode, @@lower_case_table_names, @@autocommit
                    42 Query    SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP())
                    42 Query    SHOW COLLATION
                    42 Quit
SQL file that was used looks like this:

Code: Select all

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';

DROP SCHEMA IF EXISTS `log4om` ;
CREATE SCHEMA IF NOT EXISTS `log4om` DEFAULT CHARACTER SET utf8mb4 ;
USE `log4om` ;

-- -----------------------------------------------------
-- Table `log4om`.`informations`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `log4om`.`informations` ;

CREATE  TABLE IF NOT EXISTS `log4om`.`informations` (
  `programname` VARCHAR(50) NOT NULL,
  `programversion` VARCHAR(50) NOT NULL DEFAULT '',
  `dbversion` INTEGER NOT NULL DEFAULT 0 )
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb4;

INSERT INTO `log4om`.`informations` SET `ProgramName` = 'LOG4OM2', `ProgramVersion` = '',  `DBVersion`  = 1;

-- -----------------------------------------------------
-- Table `log4om`.`log`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `log4om`.`log` ;

CREATE  TABLE IF NOT EXISTS `log4om`.`log` (
     `qsoid`                  BIGINT(17)      NOT NULL ,
     `callsign`               VARCHAR(50)     NOT NULL ,
     `band`                   VARCHAR(10)     NOT NULL,
     `mode`                   VARCHAR(30)     NOT NULL,
     `qsodate`                DATETIME        NOT NULL,
     `address`                VARCHAR(500)    DEFAULT '',
     `arrlsect`               VARCHAR(50)     DEFAULT '',
     `age`                    DECIMAL(18, 3),
     `aindex`                 DECIMAL(18, 3),
     `antaz`                  DECIMAL(18, 3),
     `antel`                  DECIMAL(18, 3),
     `antpath`                VARCHAR(50)     DEFAULT '',
     `antenna`                VARCHAR(100)    DEFAULT '',
     `arrlcheck`              VARCHAR(50)     DEFAULT '',
     `bandrx`                 VARCHAR(10)     DEFAULT '',
     `callsignurl`            VARCHAR(300)    DEFAULT '',
     `class`                  VARCHAR(50)     DEFAULT '',
     `cnty`                   VARCHAR(200)    DEFAULT '',
     `comment`                VARCHAR(500)    DEFAULT '',
     `cont`                   VARCHAR(2)      DEFAULT '',
     `contactassociations`    VARCHAR(500)    DEFAULT '',
     `contactedop`            VARCHAR(50)     DEFAULT '',
     `contactreferences`      JSON                      ,
     `contestid`              VARCHAR(50)     DEFAULT '',
     `country`                VARCHAR(100)    DEFAULT '',
     `cqzone`                 INTEGER,
     `distance`               DECIMAL(18, 3),
     `dxcc`                   INTEGER         NOT NULL DEFAULT 0,
     `eqcall`                 VARCHAR(50),
     `email`                  VARCHAR(100)    DEFAULT '',
     `forceinit`              INTEGER         DEFAULT 0,
     `freq`                   DECIMAL(18, 3)  NOT NULL DEFAULT 0,
     `freqrx`                 DECIMAL(18, 3)  NOT NULL DEFAULT 0,
     `gridsquare`             VARCHAR(10)     DEFAULT '',
     `ituzone`                INTEGER,
     `kindex`                 DECIMAL(18, 3),
     `lat`                    DECIMAL(18, 10),
     `lon`                    DECIMAL(18, 10),
     `maxbursts`              DECIMAL(18, 3),
     `msshower`               VARCHAR(50)     DEFAULT '',
     `myassociations`         VARCHAR(500)    DEFAULT '',
     `mydxcc`                 INTEGER,
     `mylat`                  DECIMAL(18, 10),
     `mylon`                  DECIMAL(18, 10),
     `mycity`                 VARCHAR(100)    DEFAULT '',
     `mycnty`                 VARCHAR(200)    DEFAULT '',
     `mycountry`              VARCHAR(100)    DEFAULT '',
     `mycqzone`               INTEGER,
     `mygridsquare`           VARCHAR(10)     DEFAULT '',
     `myituZone`              INTEGER,
     `myname`                 VARCHAR(300)    DEFAULT '',
     `mypostalcode`           VARCHAR(50)     DEFAULT '',
     `myreferences`           JSON                      ,
     `myrig`                  VARCHAR(300)    DEFAULT '',
     `mysig`                  VARCHAR(300)    DEFAULT '',
     `mysiginfo`              VARCHAR(300)    DEFAULT '',
     `mystate`                VARCHAR(200)    DEFAULT '',
     `mystreet`               VARCHAR(200)    DEFAULT '',
     `name`                   VARCHAR(300)    DEFAULT '',
     `notes`                  VARCHAR(2000)   DEFAULT '',
     `nrbursts`               DECIMAL(18, 3),
     `nrpings`                DECIMAL(18, 3),
     `operator`               VARCHAR(50)     DEFAULT '',
     `ownercallsign`          VARCHAR(50)     DEFAULT '',
     `pfx`                    VARCHAR(50)     DEFAULT '',
     `precedence`             VARCHAR(50)     DEFAULT '',
     `programid`              VARCHAR(50)     DEFAULT '', 
     `programversion`         VARCHAR(50)     DEFAULT '', 
     `propmode`               VARCHAR(50)     DEFAULT '',
     `qslmsg`                 VARCHAR(300)    DEFAULT '',
     `qslvia`                 VARCHAR(300)    DEFAULT '',
     `qsocomplete`            VARCHAR(50)     DEFAULT '',
     `qsoconfirmations`       JSON                      ,
     `qsoenddate`             DATETIME        DEFAULT NULL,
     `qsorandom`              INTEGER         NOT NULL DEFAULT 1,
     `qth`                    VARCHAR(300)    DEFAULT '',
     `rstrcvd`                VARCHAR(10)     DEFAULT '',
     `rstsent`                VARCHAR(10)     DEFAULT '',
     `rxpwr`                  DECIMAL(18, 3),
     `satelliteqso`           INTEGER         DEFAULT 0,
     `satmode`                VARCHAR(50)     DEFAULT '',
     `satname`                VARCHAR(300)    DEFAULT '',
     `sfi`                    DECIMAL(18, 3),
     `sig`                    VARCHAR(300)    DEFAULT '',
     `siginfo`                VARCHAR(300)    DEFAULT '',
     `stationcallsign`        VARCHAR(50)     NOT NULL,
     `srx`                    DECIMAL(18, 3),
     `srxstring`              VARCHAR(50)     DEFAULT '',
     `state`                  VARCHAR(200)    DEFAULT '',
     `stx`                    DECIMAL(18, 3),
     `stxstring`              VARCHAR(50)     DEFAULT '',
     `swl`                    INTEGER         DEFAULT 0,
     `txpwr`                  DECIMAL(18, 3),
  PRIMARY KEY (`mode`,`qsoDate`,`band`,`callsign`),
  UNIQUE KEY `QsoId_UNIQUE` (`qsoid`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8mb4;

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
SP9ALX
Novice Class
Posts: 3
Joined: 03 May 2023, 22:25

Re: MariaDB configuration problems

Post by SP9ALX »

I think that I know what could be happening. MariaDB has some additional available collations than MySQL:

Code: Select all

| uca1400_ai_ci                  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_ai_cs                  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_as_ci                  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_as_cs                  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_nopad_ai_ci            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_nopad_ai_cs            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_nopad_as_ci            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_nopad_as_cs            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_icelandic_ai_ci        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_icelandic_ai_cs        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_icelandic_as_ci        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_icelandic_as_cs        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_icelandic_nopad_ai_ci  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_icelandic_nopad_ai_cs  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_icelandic_nopad_as_ci  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_icelandic_nopad_as_cs  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_latvian_ai_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_latvian_ai_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_latvian_as_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_latvian_as_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_latvian_nopad_ai_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_latvian_nopad_ai_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_latvian_nopad_as_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_latvian_nopad_as_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_romanian_ai_ci         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_romanian_ai_cs         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_romanian_as_ci         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_romanian_as_cs         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_romanian_nopad_ai_ci   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_romanian_nopad_ai_cs   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_romanian_nopad_as_ci   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_romanian_nopad_as_cs   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovenian_ai_ci        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovenian_ai_cs        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovenian_as_ci        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovenian_as_cs        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovenian_nopad_ai_ci  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovenian_nopad_ai_cs  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovenian_nopad_as_ci  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovenian_nopad_as_cs  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_polish_ai_ci           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_polish_ai_cs           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_polish_as_ci           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_polish_as_cs           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_polish_nopad_ai_ci     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_polish_nopad_ai_cs     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_polish_nopad_as_ci     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_polish_nopad_as_cs     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_estonian_ai_ci         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_estonian_ai_cs         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_estonian_as_ci         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_estonian_as_cs         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_estonian_nopad_ai_ci   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_estonian_nopad_ai_cs   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_estonian_nopad_as_ci   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_estonian_nopad_as_cs   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish_ai_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish_ai_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish_as_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish_as_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish_nopad_ai_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish_nopad_ai_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish_nopad_as_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish_nopad_as_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_swedish_ai_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_swedish_ai_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_swedish_as_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_swedish_as_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_swedish_nopad_ai_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_swedish_nopad_ai_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_swedish_nopad_as_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_swedish_nopad_as_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_turkish_ai_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_turkish_ai_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_turkish_as_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_turkish_as_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_turkish_nopad_ai_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_turkish_nopad_ai_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_turkish_nopad_as_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_turkish_nopad_as_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_czech_ai_ci            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_czech_ai_cs            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_czech_as_ci            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_czech_as_cs            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_czech_nopad_ai_ci      | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_czech_nopad_ai_cs      | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_czech_nopad_as_ci      | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_czech_nopad_as_cs      | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_danish_ai_ci           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_danish_ai_cs           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_danish_as_ci           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_danish_as_cs           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_danish_nopad_ai_ci     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_danish_nopad_ai_cs     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_danish_nopad_as_ci     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_danish_nopad_as_cs     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_lithuanian_ai_ci       | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_lithuanian_ai_cs       | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_lithuanian_as_ci       | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_lithuanian_as_cs       | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_lithuanian_nopad_ai_ci | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_lithuanian_nopad_ai_cs | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_lithuanian_nopad_as_ci | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_lithuanian_nopad_as_cs | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovak_ai_ci           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovak_ai_cs           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovak_as_ci           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovak_as_cs           | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovak_nopad_ai_ci     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovak_nopad_ai_cs     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovak_nopad_as_ci     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_slovak_nopad_as_cs     | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish2_ai_ci         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish2_ai_cs         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish2_as_ci         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish2_as_cs         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish2_nopad_ai_ci   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish2_nopad_ai_cs   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish2_nopad_as_ci   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_spanish2_nopad_as_cs   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_roman_ai_ci            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_roman_ai_cs            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_roman_as_ci            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_roman_as_cs            | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_roman_nopad_ai_ci      | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_roman_nopad_ai_cs      | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_roman_nopad_as_ci      | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_roman_nopad_as_cs      | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_persian_ai_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_persian_ai_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_persian_as_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_persian_as_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_persian_nopad_ai_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_persian_nopad_ai_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_persian_nopad_as_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_persian_nopad_as_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_esperanto_ai_ci        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_esperanto_ai_cs        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_esperanto_as_ci        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_esperanto_as_cs        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_esperanto_nopad_ai_ci  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_esperanto_nopad_ai_cs  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_esperanto_nopad_as_ci  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_esperanto_nopad_as_cs  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_hungarian_ai_ci        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_hungarian_ai_cs        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_hungarian_as_ci        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_hungarian_as_cs        | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_hungarian_nopad_ai_ci  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_hungarian_nopad_ai_cs  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_hungarian_nopad_as_ci  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_hungarian_nopad_as_cs  | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_sinhala_ai_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_sinhala_ai_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_sinhala_as_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_sinhala_as_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_sinhala_nopad_ai_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_sinhala_nopad_ai_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_sinhala_nopad_as_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_sinhala_nopad_as_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_german2_ai_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_german2_ai_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_german2_as_ci          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_german2_as_cs          | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_german2_nopad_ai_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_german2_nopad_ai_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_german2_nopad_as_ci    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_german2_nopad_as_cs    | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_vietnamese_ai_ci       | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_vietnamese_ai_cs       | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_vietnamese_as_ci       | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_vietnamese_as_cs       | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_vietnamese_nopad_ai_ci | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_vietnamese_nopad_ai_cs | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_vietnamese_nopad_as_ci | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_vietnamese_nopad_as_cs | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_croatian_ai_ci         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_croatian_ai_cs         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_croatian_as_ci         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_croatian_as_cs         | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_croatian_nopad_ai_ci   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_croatian_nopad_ai_cs   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_croatian_nopad_as_ci   | NULL     | NULL | NULL    | Yes      |       8 |
| uca1400_croatian_nopad_as_cs   | NULL     | NULL | NULL    | Yes      |       8 |
And here is possible problem explanation: https://learn.microsoft.com/en-us/answe ... not-be-cas
That is correct. when a column value is null, the object DBNull is returned rather than a typed value. You must first test that the column value is not null via the api before accessing as the desired type.
It all makes sense - database check fails after "SHOW COLLATION" command send by LOG4OM.
wx4cb
Novice Class
Posts: 5
Joined: 08 Jan 2023, 22:25

Re: MariaDB configuration problems

Post by wx4cb »

is there a fix for this?

i have tried the latest stable release as I havent used l4om for a while (been off radio for a couple of months) and just came back to this error.
F4BPO
Old Man
Posts: 192
Joined: 22 Jan 2013, 10:49
Location: Vietnam

Re: MariaDB configuration problems

Post by F4BPO »

Why don't you let Log4OM create the dabatase itself, it will also create the user for the database.
You only need root access to do that.
I do not know why you would try to create a .sql on your own.
73 de XV9Q Greg
SP9ALX
Novice Class
Posts: 3
Joined: 03 May 2023, 22:25

Re: MariaDB configuration problems

Post by SP9ALX »

Please read original posts one more time. The problem is not with creation of database or user but the fact that LOG4OM (or library that it uses to be precise) fails when it gets unexpected results from initial “SHOW COLLATION” query.
KD2QAR
New user
Posts: 2
Joined: 31 Jan 2023, 07:05

Re: MariaDB configuration problems

Post by KD2QAR »

Same problem here. I recently upgraded my mariadb server to the latest lts version, 10.11. Everything went fine but log4om2 would no longer connect to the database. I spent a bunch of time looking at the permissions etc. trying to understand what changed. I finally spun up another container with an older version (10.3) and restored the database from my last usable backup.
I had, incrementally, changed the version from 10.3 to 10.11 and checked each version change to be sure the data was not corrupted. I did not check them using log3om2.

With the crisis averted I decided to use another container to simulate my original steps and discover where the problem occurred. The incremental upgrades worked all the way to 10.6 but the upgrade to 10.11 failed. At 10.11 the upgraded database was giving me a "Database seems not valid". Additionally, log4om2 was no longer able to create a new database in 10.11 using an admin user.
It seems that there is some incompatibility between log4om2 and mariadb 10.11.
The file contains the scripts that I used to create the test container and a more detailed description on how to recreate my observations.
log4omdbtest.tar.gz
(2.37 KiB) Downloaded 815 times
-Mark KD2QAR
DE KD2QAR
ak7vv
Novice Class
Posts: 11
Joined: 13 Nov 2023, 07:50
Location: Redmond, WA, USA
Contact:

MySQL/MariaDB connector needs update (Re: MariaDB configuration problems)

Post by ak7vv »

Looks like there's a bunch of us stumbling into the same problem with incompatibility with versions > 10.6*. Has there been any progress on this issue? Xref'ing the other thread I stumbled into first where I added my comments: https://forum.log4om.com/viewtopic.php?p=45846#p45846

Current long term stable is 10.11 and short term stable is 11.2.

Reference to what the breaking issue is in 10.11 that triggers the DBNull cannot cast error:
https://jira.mariadb.org/browse/MDEV-27009

* in turn, only 10.9 or older is compatible.

And this https://stackoverflow.com/questions/740 ... ast-from-d
sounds like what needs to happen is for Log4OM2 to be built with a newer version of the mysqlconnector? https://mysqlconnector.net/tutorials/mi ... ector-net/

Thanks,
Christian
ak7vv
Novice Class
Posts: 11
Joined: 13 Nov 2023, 07:50
Location: Redmond, WA, USA
Contact:

Re: MariaDB configuration problems

Post by ak7vv »

I brought up a container with 10.6 in parallel to 11.2 and can confirm that 10.6 works, 11.2 does not. Here are the docker-compose sections for trying a repro. 3306/tcp is 11.2, 3307/tcp is 10.6, uid/gid 981 = mysql.

Code: Select all

  db:
    container_name: db
    image: mariadb:latest
    restart: always
    ports: 
      - "3306:3306"
    user: 981:981
    environment:
      - PUID=981
      - PGID=981
      - MYSQL_ROOT_PASSWORD='hahaveryfunny'
      - TZ=Americas/Los_Angeles
      - MARIADB_AUTO_UPGRADE=yes
    volumes:
      - /etc/passwd:/etc/passwd:ro
      - /etc/group:/etc/group:ro
      - /docker/mariadb/conf:/config
      - /docker/mariadb/data:/var/lib/mysql
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro

  db10_6:
    container_name: db10_6
    image: mariadb:10.6
    restart: always
    ports: 
      - "3307:3306"
    user: 981:981
    environment:
      - PUID=981
      - PGID=981
      - MYSQL_ROOT_PASSWORD='hahaveryfunny'
      - TZ=Americas/Los_Angeles
      - MARIADB_AUTO_UPGRADE=no
    volumes:
      - /etc/passwd:/etc/passwd:ro
      - /etc/group:/etc/group:ro
      - /docker/mariadb10.6/conf:/config
      - /docker/mariadb10.6/data:/var/lib/mysql
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
While I can certainly run a MariaDB 10.6 instance just for Log4OM2 as a workaround, I would like to stay on the latest stable as multiple services have their database in this 11.2 instance, and running two instances just sets things up to get messy eventually.

So, unless somebody has evidence to the contrary, we need a new build of Log4OM2 with an updated database connector.

Thanks,
Christian
User avatar
IW3HMH
Site Admin
Posts: 2927
Joined: 21 Jan 2013, 14:20
Location: Quarto d'Altino - Venezia (ITA)
Contact:

Re: MariaDB configuration problems

Post by IW3HMH »

I'll pack new beta with latest version of the connector as soon as i've it available.
Can you eventually try connecting with it and let me know?
Daniele Pistollato - IW3HMH
ak7vv
Novice Class
Posts: 11
Joined: 13 Nov 2023, 07:50
Location: Redmond, WA, USA
Contact:

Re: MariaDB configuration problems

Post by ak7vv »

Absolutely, happy to. Email via QRZ.com is always good way to get immediate attention. ;-)
Post Reply