LNMS migrate error - General error: 1025 Error on rename

./validate is presenting database out of date and suggests that I run ./lnms migrate.
When I do that, I get:

[email protected]:~$ ./lnms migrate


  • Application In Production!     *
    

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

yes

Migrating: 2021_08_26_093522_config_value_to_medium_text

In Connection.php line 703:

SQLSTATE[HY000]: General error: 1025 Error on rename of ‘./librenms/config’ to ‘./librenms/#sql-backup-70d-18c3’ (errno: 168 “Unknown (generic) error from e
ngine”) (SQL: ALTER TABLE config CHANGE config_value config_value MEDIUMTEXT CHARACTER SET utf8mb4 NOT NULL COLLATE utf8mb4_unicode_ci)

In Exception.php line 18:

SQLSTATE[HY000]: General error: 1025 Error on rename of ‘./librenms/config’ to ‘./librenms/#sql-backup-70d-18c3’ (errno: 168 “Unknown (generic) error from e
ngine”)

In PDOStatement.php line 117:

SQLSTATE[HY000]: General error: 1025 Error on rename of ‘./librenms/config’ to ‘./librenms/#sql-backup-70d-18c3’ (errno: 168 “Unknown (generic) error from e
ngine”)

Any idea how to work around it? Validate output:

====================================

Component Version
LibreNMS 21.11.0
DB Schema 2021_07_28_102443_plugins_add_version_and_settings (215)
PHP 7.3.29
Python 3.6.8
MySQL 10.6.3-MariaDB
RRDTool 1.7.2
SNMP NET-SNMP 5.7.2

====================================

[OK] Composer Version: 2.1.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Your database is out of date!
[FIX]:
./lnms migrate
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.

Problem solved after recreating a lot of tables with the current “COLLATE” and datatype options, as the errors were presented by ./lnms migrate.
Ended up learning a lot about MySQL.

1 Like

Nice work!

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