error installation cacti on ubuntu 16.04

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
boukaribadreddine
Posts: 6
Joined: Sun May 06, 2018 10:15 am

error installation cacti on ubuntu 16.04

Post by boukaribadreddine »

Please guide me to add a feature that i didn't find it in the nagios Core 4.2.1 on Ubuntu LTS 16.04.

i installed nagios core succesfly to morinitor an Oracle database in a windows machine, i have to install cacti (and cacti -spine) on the same machine ubuntu 16.04
i have installed elements with apt-get install apache2 mysql-server-5.6 php libapache2-mod-php
also (apt-get install snmp snmpd rrdtool)
but when i try to install cacti with (apt-get install cacti cacti-spine), i get this error (it's related with mysql database i think !!)
"
Configuration de cacti
Une erreur s'est produite lors de la création de la base de données.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) "

i have follow this link to install cacti on Linux ubuntu 16.04 LTS : https://linoxide.com/ubuntu-how-to/inst ... ntu-16-04/
my objective in the end is to show the dashboards for my services in nagios. i like to add some feauture to display the dashboards for excelent view ( cacti tool for interface)
help me please.
thanks so much.
Attachments
Access denied for user.PNG
Access denied for user.PNG (167.84 KiB) Viewed 975 times
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: error installation cacti on ubuntu 16.04

Post by netniV »

i think the problem is that the package install seems to doing this without specifying a root password. This when trying to import the database that is failing. Probably because you have a root password set after running the mysql_secure_installation script. The answer would be to temporarily allow root login without specifying a password and then make sure to remove that again later.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
boukaribadreddine
Posts: 6
Joined: Sun May 06, 2018 10:15 am

Re: error installation cacti on ubuntu 16.04

Post by boukaribadreddine »

thanks a lot, i have installed this with setting the root root password in a configuration file of cacti in the path /etc/mysql/debian.cnf
=======================================
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = root
password = root ======> it was no password, and i have set it manually
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = root
password = root ======> it was no password, and i have set it manually
socket = /var/run/mysqld/mysqld.sock
========================================

Just to help other people who have the same problem. :) :)
Thanks a lot.
paulgevers
Cacti Pro User
Posts: 613
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: error installation cacti on ubuntu 16.04

Post by paulgevers »

boukaribadreddine wrote:thanks a lot, i have installed this with setting the root root password in a configuration file of cacti in the path /etc/mysql/debian.cnf
=======================================
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = root
password = root ======> it was no password, and i have set it manually
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = root
password = root ======> it was no password, and i have set it manually
socket = /var/run/mysqld/mysqld.sock
========================================


Just to help other people who have the same problem. :) :)
Thanks a lot.
But this is wrong. It should use the socket.

Was the database server running when you installed cacti?
Maintainer of cacti in Debian (and Ubuntu).
Cacti 1.* is now officially supported on Debian Stretch via Debian backports
FAQ Ubuntu and Debian differences
Generic cacti debugging
boukaribadreddine
Posts: 6
Joined: Sun May 06, 2018 10:15 am

Re: error installation cacti on ubuntu 16.04

Post by boukaribadreddine »

yes of course, my sql database was running during and after installation.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests