Cacti not connecting to mysql after macports upgrade

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

Moderators: Developers, Moderators

Post Reply
phasperhoven
Posts: 2
Joined: Mon Jul 02, 2012 4:26 pm

Cacti not connecting to mysql after macports upgrade

Post by phasperhoven »

Hi,

My cacti installation on a Lion-powered Mac with macports was running fine until I decided to bring my macports packages up to date by issueing a 'port upgrade outdated'.
This somehow replaced config.php but even after I entered the right parameters again, I still get the message: "FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'".

I have tried a lot of stuff:
- running as root
- restarting apache
- resetting passwords
- using different hostnames
- changing localhost to 127.0.0.1
- granting rights in mysql
- etc.

I can connect to the mysql server just fine using the mysql5 client and cacti user credentials, but that's where it ends.

Anyone seen this and better yet, solved it?

TIA,
Peter
phasperhoven
Posts: 2
Joined: Mon Jul 02, 2012 4:26 pm

Re: Cacti not connecting to mysql after macports upgrade

Post by phasperhoven »

OK, I solved it. Well, solved? I got it running again:-)

Changed host to 127.0.0.1 (not localhost! Hmmm, reverse resolving not working right?), user to root and of course the corresponding password. The web interface then asked me to do an upgrade which I did. Now the graphs came back. Then I changed the user back to cacti and now it works.

Well, apparently, when you think you tried all the combinations of parameters, you can still forget one:-)

Cheers,
Peter
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests