FATAL: Connection to Cacti database failed. Please ensure:

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

Moderators: Developers, Moderators

Post Reply
fpvjohnt
Posts: 3
Joined: Thu Jan 19, 2023 6:26 pm

FATAL: Connection to Cacti database failed. Please ensure:

Post by fpvjohnt »

the PHP MySQL module is installed and enabled.
the database is running.
the credentials in config.php are valid.


Any help on this issue
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: FATAL: Connection to Cacti database failed. Please ensure:

Post by Osiris »

Try connection from the command line.
Before history, there was a paradise, now dust.
fpvjohnt
Posts: 3
Joined: Thu Jan 19, 2023 6:26 pm

Re: FATAL: Connection to Cacti database failed. Please ensure:

Post by fpvjohnt »

I am connecting to the database using the following command

sudo mysql -u root -p
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: FATAL: Connection to Cacti database failed. Please ensure:

Post by Osiris »

Try this:

Code: Select all

mysql -ucactiuser -p cacti
Before history, there was a paradise, now dust.
usernews
Posts: 9
Joined: Tue Dec 08, 2020 3:00 am

Re: FATAL: Connection to Cacti database failed. Please ensure:

Post by usernews »

This command works for me but the error does not disappear
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: FATAL: Connection to Cacti database failed. Please ensure:

Post by TheWitness »

So, you are likely missing either the PDO or MySQL PHP modules. You have to restart httpd and php-fpm (if installed) after adding them. See the documentation on docs.cacti.net.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests