FAIL on MySQL Database

librenms@librenms:~$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.61
DB Schema | 2020_02_10_223323_create_alert_location_map_table (159)
PHP       | 7.2.24-0ubuntu0.18.04.1
MySQL     | 10.1.41-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 1.9.3
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[FAIL]  MySQL Database collation is wrong: latin1 latin1_swedish_ci
	[FIX]: 
	Check https://t.libren.ms/-zdwk for info on how to fix.
[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 Discord (https://t.libren.ms/discord) or the community site (https://t.libren.ms/5gscd):
	[FIX]: 
	Run the following SQL statements to fix.
	SQL 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' ;

In that link it says to run this:
echo ā€˜ALTER DATABASE librenms CHARACTER SET utf8 COLLATE utf8_unicode_ci;ā€™ | mysql -p -u librenms librenms
Enter password:
ERROR 1045 (28000): Access denied for user ā€˜librenmsā€™@ā€˜localhostā€™ (using password: YES)


I donā€™t know what this password is. If I set it up, I donā€™t remember what it is. Can I reset it?

Also Iā€™m getting errors about the time.

have you take a look into /opt/librenms/config.php

there youā€™ll find credentials needed to connect to database

1 Like

Thank you. That did fix that part of it.

So now I am facing the issue with the other part, the date colums in the data base are incorrect.
The only thing Iā€™ve changed is in /etc/php/7.2/cli/php.ini I put America/Chicago for the date.timezone and the same thing for /etc/php/7.2/fpm/php.ini. Was I not supposed to put that in there? Iā€™d put it back how it was but I didnt backup the file or do I remember what was in thereā€¦ oops.

https://docs.librenms.org/Installation/Installation-Ubuntu-1404-Apache/

"
In /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini , ensure date.timezone is set to your preferred time zone. See http://php.net/manual/en/timezones.php for a list of supported timezones. Valid examples are: ā€œAmerica/New Yorkā€, ā€œAustralia/Brisbaneā€, ā€œEtc/UTCā€.
"

maybe this helps

the docs just talk about install/basic setup but not about my issue. Those 2 files dont exist on my system.

searching here in Forum gave me several similar results:
e.G. Timezone mismatch between server and mysql database

could you take a look in there, please?