DB Migration and LNMS Update - Now UI shows wrong DB schema


I recently moved my DB from Maria v.10 to MySQL 5.7 and at the same time performed an update on LibreNMS.

Now, the cli and UI are out of sync ?

The UI About provides this info:

|Version|1.47 - Sun Dec 30 2018 14:29:16 GMT+0000|
|DB Schema|#270|
|Web Server|Apache/2.4.37 (FreeBSD) PHP/7.2.14 OpenSSL/1.1.1a-freebsd mod_perl/2.0.10 Perl/v5.28.1|

while if I run the validate.php from cli I get:

# php validate.php 
Component | Version
--------- | -------
LibreNMS  | 1.47
DB Schema | 275
PHP       | 7.2.14
MySQL     | 5.7.24-log
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3

I am not sure if the UI information is cached somewhere or if the issue is to do with the code not being run from one of the files?

If I attempt to access a device in the UI it throws this error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'librenms.ports_nac' doesn't exist

<- though I have checked the DB and the tables definitely do exist.

Would someone be able to assist?


Did you update .env? https://docs.librenms.org/Support/FAQ/#where-do-i-update-my-database-credentials

That was it!

Unfortunately the only output provided after update was to run the daily.php so I missed that step.

Thank you all fixed now :wink:

1 Like