- 论坛徽章:
- 0
|
错的跟人都不一样,请老大帮忙。
装了两天了(因为对mysql、php、apache都不熟),终于都弄完。但连接时还是报错,请楼主帮忙:
错误是这样的。通过http://localhost/cacti连接后,提示:
“Error
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 cactiuser -p cactidb < cacti.sql
This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.
”
然后,我drop database。重新create database。并按上面的提示,用cactiuser重新导入表,并在连接到cactidb之后,可以show table,也可以select。所以,表的导入应该是没问题的,cactiuser对表的权限应该也没有问题,因为我都是按楼主的方法做了grant的。所以,这个提示不好理解。
然后,我用snmpwalk测试是可以得到内容的。
rra的目录权限也没有问题。
但rra目录下确实没有内容。
按FAQ里面提到的解决rra目录下没有内容的办法,剩下第三种测试方法:“2.3、也可能是snmpwalk、snmpget和rrdtool的路径没有设置好在Settings-》Paths中检查设置是否正确。”就这个方法,不太明白,好像没地方找这个settings-》paths。
然后,去看了/www/htdocs/cacti/log/cacti.log,看到有错误提示:
“11/02/2006 10:10:09 AM - 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'.
11/02/2006 10:15:02 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
11/02/2006 10:15:02 AM - SYSTEM STATS: Time:292.5468 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources: RRDsProcessed:0
11/02/2006 10:15:09 AM - 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'.
11/02/2006 10:25:10 AM - 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'.
”
然后,我打开config.php查看
$database_type = "mysql";
$database_default = "cactidb";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactipw";
$database_port = "3306";
都没有什么问题。
唉,可难住我了。
基本就是这些情况,请楼主和各位dx们指点,谢了先。 |
|