본문 바로가기
  • AI (Artificial Intelligence)
Security/Monitoring

[Cacti] Cannot connect to MySQL server on 'localhost'...

by 로샤스 2014. 12. 4.

My System: RHEL 5.5
Cacti Version: 0.8.8a and 0.8.7g

After setup when I try to browse, an error shows: FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'

Could anyone please help me regarding this.

Some Info related to my configuration:

Code:
groupadd cacti
useradd -g cacti cactiuser

MySQL configuration:
set password for root@localhost=password('*****');
create database cactidb;
grant all on cactidb.* to root;
grant all on cactidb.* to root@localhost;
grant all on cactidb.* to cactiuser;
grant all on cactidb.* to cactiuser@localhost;
use cactidb;
set password for cactiuser@localhost=password('*****');


And in include/config.php:

Code:
$database_type = "mysql";
$database_defaut = “cactidb”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “*****”;



With same configuration I have configured cacti one years ago. I can't understand why the error is showing. Please help me.

 

 

 

 

 

출처 : http://forums.cacti.net/viewtopic.php?f=2&t=49673

 

 

 

 

 

 

 

 

 

 

 

 

 

댓글