Okay, so due to space constraints, i moved the mysql data directory from /var/mysql to a DAS RAID, at /Volumes/LanAdmin/databasestores/mysql
This is on a DP Xserve G5, Mac OS X Server 10.4.8, cacti .8.6i
I added this to /etc/my.cnf in the [mysqld] section:
datadir = /Volumes/LanAdmin/databasestores/mysql/
I changed the socket lines for [mysqld] and [client] to read:
socket = /Volumes/LanAdmin/databasestores/mysql/mysql.sock
and
socket = /Volumes/LanAdmin/databasestores/mysql/mysql.sock
Respectively.
I moved the mysql directory structure via:
cp -Rpv /var/mysql /Volumes/LanAdmin/databasestores/
all the files moved over with correct permissions and ownership.
I can log into the cacti database as the cacti user via :
mysql -u nagios -p cacti
the hostname, username, and password in include/config.php look to be correct.
Trying to access cacti from the web, I get the standard:
You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:
mysql -u nagios -p cacti < cacti.sql
message. If I run php -q poller.php from the cacti directory, I get:
xserve02:/usr/local/nagios/share/cacti-0.8.6h admin$ php -q ./poller.php
sh: line 1: -: command not found
the errors I get in my log file read:
02/05/2007 02:26:16 PM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
the pertinent sections from that file read:
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "nagios";
$database_password = "nagios";
$database_port = "3306";
ideas?
Help, moved database, no cacti love!
Moderators: Developers, Moderators
well, line 1 is where you specify the path for your binary.. in this case php.
for example
make sure you're php line is correct
for example
Code: Select all
#!/usr/bin/php -q
Yep, just checked:mvam wrote:well, line 1 is where you specify the path for your binary.. in this case php.
for example
make sure you're php line is correctCode: Select all
#!/usr/bin/php -q
Code: Select all
admin$ which php
/usr/bin/php
Who is online
Users browsing this forum: No registered users and 1 guest