安装cacti被监控主机始终处于Unknown状态;
安装cacti被监控主机始终处于Unknown状态;在服务器端输入提示错误;cacti]#phppoller.phpFATAL:CannotconnecttoMySQLs...
安装cacti被监控主机始终处于Unknown状态;在服务器端输入 提示错误;
cacti]# php poller.php
FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'
rra/下面没有图像,权限755 执行上面的命令提示错误怎么回事? 展开
cacti]# php poller.php
FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'
rra/下面没有图像,权限755 执行上面的命令提示错误怎么回事? 展开
2个回答
展开全部
#mysql -u root -p
Password:
# mysql>create database cacti;
# mysql>grant all on cacti.* to cacti@localhost identified by ‘cacti’;
修改cacti使之可以访问数据库
#vim /usr/local/cacti/include/config.php
# $database_type = "mysql";
#$database_default = "cacti";
#$database_hostname = "localhost";
#$database_username = "cacti";
#$database_password = "cacti";
#$database_port = "3306";
导入数据库文件
#mysql -u root -p cacti < cacti.sql
Password:
# mysql>create database cacti;
# mysql>grant all on cacti.* to cacti@localhost identified by ‘cacti’;
修改cacti使之可以访问数据库
#vim /usr/local/cacti/include/config.php
# $database_type = "mysql";
#$database_default = "cacti";
#$database_hostname = "localhost";
#$database_username = "cacti";
#$database_password = "cacti";
#$database_port = "3306";
导入数据库文件
#mysql -u root -p cacti < cacti.sql
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询