PHP validation errors

Hello
I have installed LibreNMS on raspberry Pi successfully and working calmly :slight_smile:
But I get those errors when I run the validate.php

Component Version
LibreNMS 1.32-75-ga5dc4b2dc
DB Schema 211
PHP 7.0.19-1
MySQL 10.1.23-MariaDB-9+deb9u1
RRDTool 1.6.0
SNMP NET-SNMP 5.7.3

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

[OK] Database connection successful
[FAIL] Database: incorrect column (notifications/datetime)
[FAIL] Database: incorrect column (users/created_at)
[FAIL] We have detected that your database schema may be wrong, please report the following to us on IRC or the community site (https://t.libren.ms/5gscd):
ALTER TABLE notifications CHANGE datetime datetime timestamp NOT NULL DEFAULT β€˜1970-01-02 00:00:00’;
ALTER TABLE users CHANGE created_at created_at timestamp NOT NULL DEFAULT β€˜1970-01-02 00:00:01’;

Do I need to worry as LibreNMS working fine?
any help will be appreciated

LibreNMS will keep working fine, but you should fix those.

run: mysql -u librenms -p librenms and enter the password (db_pass from config.php)
Then paste in the alter statements:

ALTER TABLE `notifications` CHANGE `datetime` `datetime` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00';
ALTER TABLE `users` CHANGE `created_at` `created_at` timestamp NOT NULL DEFAULT '1970-01-02 00:00:01';
1 Like

Thanks for the reply

I’m getting this error when I try to login to mysql

$mysql -u librenms -p
mysql: unknown variable β€˜innodb_file_per_table=1’

I’ve attached /etc/mysql/my.cnf file output
not sure if this helps

[client-server]

Import all .cnf files from configuration directory

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
innodb_file_per_table=1
sql-mode=β€œβ€
lower_case_table_names=0

Thanks
I found the solution for this
I’ve to add following

[mysqld]
innodb_file_per_table=1
sql-mode=β€œβ€
lower_case_table_names=0

and update the database as you adviced
Many thanks
No errors now :slight_smile:

1 Like