Cacti New Install Claims Wrong Database Password - But Isn't

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
knebb
Cacti User
Posts: 131
Joined: Tue Sep 19, 2006 11:29 am

Cacti New Install Claims Wrong Database Password - But Isn't

#1 Post by knebb » Sun Jan 13, 2019 5:04 pm

Hi,

I am confused :-?

I set up a new instance of Cacti on CentOS7/64.

I edited the config.php:

Code: Select all

$database_type     = 'mysql';
$database_default  = 'cacti';
$database_hostname = 'host.domain.de';
$database_username = 'cacti';
$database_password = 'azXJcLXfEWLY';
$database_port     = '3306';
$database_ssl      = false;
but I am getting "FATAL: Connection to Cacti database failed. Please ensure the database is running and your credentials in config.php are valid."

I can easily do:

Code: Select all

[[email protected] include]# mysql -u cacti -h host.domain.de -p cacti
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 142
Server version: 5.5.57-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [cacti]>
Even after a reboot of the server nothing changes.

I am out of ideas- is there something more verbose or where can I check what is going wrong?

Thanks in advance!

/KNEBB

User avatar
Osiris
Cacti Pro User
Posts: 835
Joined: Mon Jan 05, 2015 10:10 am

Re: Cacti New Install Claims Wrong Database Password - But I

#2 Post by Osiris » Sun Jan 13, 2019 6:01 pm

Is that hostname the localhost or a remote host. Also, ensure PDO and pdo-mysql are installed.
Before history, there was a paradise, now dust.

User avatar
knebb
Cacti User
Posts: 131
Joined: Tue Sep 19, 2006 11:29 am

Re: Cacti New Install Claims Wrong Database Password - But I

#3 Post by knebb » Mon Jan 14, 2019 12:21 am

[edit]
It was craping SELinux! :evil:
Running fine now.


Hi,

thanks for the idea.
It is a remote host, yes. I can ping amd connect with the mysql client without any issues as shown above.

I am unsure if I had it the pdo properly installed so I added webtatic repo and installed:

Code: Select all

[[email protected] etc]# yum -y install php56w-pdo_mysql
Geladene Plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.alpha-labs.net
 * epel: ftp.plusline.net
 * extras: centos.mirrors.as250.net
 * updates: mirror.imt-systems.com
 * webtatic: uk.repo.webtatic.com
Paket php56w-mysql-5.6.39-1.w7.x86_64 ist bereits in der neuesten Version installiert.
Nichts zu tun
But Cacti still says the same error:
FATAL: Connection to Cacti database failed. Please ensure the database is running and your credentials in config.php are valid.

Any further idea?

/KNEBB
Last edited by knebb on Tue Jan 22, 2019 3:32 pm, edited 1 time in total.

paulgevers
Cacti Pro User
Posts: 590
Joined: Tue Aug 29, 2006 4:09 pm
Location: NL

Re: Cacti New Install Claims Wrong Database Password - But I

#4 Post by paulgevers » Tue Jan 22, 2019 3:13 pm

In Debian I had issues with php7.2 to php7.3 update that not all modules were properly enabled. I think I saw the same issue. Maybe worth a check
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

Post Reply