custom database_port

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

Moderators: Developers, Moderators

Post Reply
donaldf
Posts: 2
Joined: Tue Jun 12, 2012 1:44 am

custom database_port

Post by donaldf »

Hi
I have configured my db on a custom port (able to telnet to 33066), but cacti is unable to connect to it. tired to configure other application and they work fine on that port.
Error
FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'


Cacti 0.8.8a
Apache/2.4.2 (Win64) PHP/5.4.3
PHP Version 5.4.3
mysql-5.5.25-winx64

Donald
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: custom database_port

Post by BSOD2600 »

As the error suggests, have you edited include/config.php to specify the port?
donaldf
Posts: 2
Joined: Tue Jun 12, 2012 1:44 am

Re: custom database_port

Post by donaldf »

Have already done that, below is the $dsn that is created by the cacti\lib\database.php and telnet response.

FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'
--------------------------------------------------------------------------------
---'mysql://cacti:cacti@localhost/cacti?persist&port=33066'
---------------------------------------------------------------------------------
C:\>telnet localhost 33066
J
5.5.25¼uwwm>/k☻ǧ<o>(K!aH"p1Amysql_native_password
---------------------------------------------------------------------------------
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "cacti";
$database_port = "33066";
$database_ssl = false;
---------------------------------------------------------------------------------
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: custom database_port

Post by BSOD2600 »

The web server service was cycled since you updated config.php, right?

Before filing a bug (http://www.cacti.net/bugs.php), would you please confirm with a packet capture that Cacti is still trying to communicate to MySQL on the default port 3306?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests