[solved] Fresh Install but mysql cactiuser not working

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
chrisl
Posts: 1
Joined: Tue Mar 16, 2010 9:19 am

[solved] Fresh Install but mysql cactiuser not working

Post by chrisl »

This is a fresh install on a new server

Windows 2003 Server
IIS 6.0
Cacti 0.8.7e
cyqwin
php 5.3.2 32bit
fcgi 1.5
mysql 5.1.44 win32

When I go to http://localhost/cacti I get the the following page:
Error: FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'

config.php:
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipw";
$database_port = "3306";

I have created 2 users in MYSQL but they do not work in the config.php. If I change the config.php to use the root username and password I see the install page.

Here is how I created the cactiuser:
mysql --user=root --password mysqlmysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipw';
mysql> flush privileges;

mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('cactipw') WHERE Host = 'localhost' AND User = 'cactiuser';
mysql> FLUSH PRIVILEGES;

But when I type in the comands above it stats 0 rows effected.

I can logonto mysql as cactiuser cactipw.

I do not want to use the root user for cacti.

Also I followed bsod2600's instructions and when I installed PHP it stated to move the contents of the c:\usr\mibs folder. Where do I get that folder it is not on my system and not in the cacti download?


Thank you in advance for any advice or help.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

PHP 5.3.x is not supported in cacti 0.8.7x, please go back to 5.2.x

Did you enable the old-passwords option in my.ini too?
wouter
Posts: 4
Joined: Tue Mar 23, 2010 10:57 am

Post by wouter »

i'm getting the same error after following the installation instruction.

apache: 2.2.15, 32bit
PHP: 5.2.13
MySQL: 5.1.45, 64bit

I've had to use php5apache2_2.dll instead of php5apache2.dll or my apache would not start. Could this cause the problem?

Logging in from the commandline works
mysql --user=cactiuser --password
password: cacti

i have this in my my.ini file
[mysqld]
old-passwords

and this in my cacti config
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "xxxxxxxxxx.be";
$database_username = "cactiuser";
$database_password = "cacti";
$database_port = "3306";

i'm not sure what this old-password thing is, i've tried these variations:
UPDATE mysql.user SET Password = OLD_PASSWORD('cactipwd') WHERE Host = 'localhost' AND User = 'cactiuser';
UPDATE mysql.user SET Password = OLD_PASSWORD('cacti') WHERE Host = 'localhost' AND User = 'cactiuser';

But still
FATAL: Cannot connect to MySQL server on 'xxxxxxxxxxxxx.be'. Please make sure you have specified a valid MySQL database name in 'include/config.php'

let me know if you need more information,
thx
User avatar
ARC1450
Cacti User
Posts: 104
Joined: Wed Jun 24, 2009 9:42 am

Post by ARC1450 »

In your spine.conf, try setting your "$database_hostname" to "localhost".
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Yes, you should be using php5apache2_2.dll.

are you able to connect to mysql using your mysql cacti username/password?

The "UPDATE mysql.user SET Password.." stuff you do from mysqladmin at the commandline.

The error message says that mysql can't connect to that 'xxxxxxxxxxxxx.be' server. Looks like the mysql server isn't running locally? If not, then you'll need to adjust where the mysql cacti user account can connect from (i.e. replace localhost with 'xxxxxxxxxxxxx.be').
wouter
Posts: 4
Joined: Tue Mar 23, 2010 10:57 am

Post by wouter »

ARC1450 wrote:In your spine.conf, try setting your "$database_hostname" to "localhost".
That didn't solve it, but changing it in the cacti config file to localhost did.
i'd like to call this a bug, or an undocumented requirement. (yes, it sais localhost in the documentation, but... c'mon...)

Anyway, thanks for the help, looking forward to start playing with cacti :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests