FIXED -Your database is out of date! ./lnms migrate - error

Following
$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 21.3.0-57-g6616727a9
DB Schema | 2021_03_11_003713_rename_printer_columns (204)
PHP | 7.4.14
Python | 3.6.9
MySQL | 10.1.47-MariaDB-0ubuntu0.18.04.1
RRDTool | 1.7.0
SNMP | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 2.0.11
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[FAIL]  MariaDB version 10.2.2 is the minimum supported version as of March, 2021. We recommend you update MariaDB to a supported version 10.5 suggested). Failure to update MariaDB will eventually cause issues.
[FAIL]  Your database is out of date!
        [FIX]:
        ./lnms migrate
[WARN]  Your local git contains modified files, this could prevent automatic updates.
        [FIX]:
        You can fix this with ./scripts/github-remove
        Modified Files:
         rrd/.gitignore

I did
$ ./lnms migrate
**************************************
* Application In Production! *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Migrating: 2021_02_09_122930_migrate_to_utf8mb4

In Connection.php line 678:

  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: ALTER TABLE `alert_rules`
                      MODIFY `name`
                      varchar(255)
                      CHARACTER SET utf8mb4
                      COLLATE utf8mb4_unicode_ci
                      NOT NULL ;)


In Exception.php line 18:

  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes


In PDOConnection.php line 52:

  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

I do not know how to solve this
Any help will be appreciated

Did you upgrade MariaDB to minimum supported version?
you have to do that first

Hello I have the same problem, same message.
How to update MariaDB from version 10.1.47 to version 10.5 ? (Ubuntu 18.04)
Thanks you :wink:

I recommend you start looking here https://mariadb.com/kb/en/upgrading-from-mariadb-101-to-mariadb-102/

Ok after upgrading to mariadb 10.5 everything is ok
Many thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.