Currently using 0.8.8a with MySQL on a Windows box. We have another application we are trying to load on the same server that also uses MySQL. This app has MySQL embedded inside it, and is using port 3306. Due to this, the install fails due to it conflicting with the Cacti install.
I've been searching the web and these forums to find a way to change the default port MySQL uses for Cacti from 3306 to 3307. I've edit all the .ini files I found referencing port 3306, but it still doesn't work. I'm only assuming somewhere inside MySQL needs to be updated to reflect this, but honestly, this is where my expertise falls short.
Can someone please help walk me through making this change? We're trying to avoid having to purchase a new server, when the only thing the current one is doing is running Cacti. Thanks in advanced!
Please move accordingly if this is in the wrong forum.
MySQL on Windows - default port 3306
Moderators: Developers, Moderators
Re: MySQL on Windows - default port 3306
1) the installer doesnt work with existing installations of mysql, php, or apache for this very reason.
2) once youve modified my.ini and restarted the mysql service, it should pick up the change. your other application runs mysql service in a non-standard manor?
2) once youve modified my.ini and restarted the mysql service, it should pick up the change. your other application runs mysql service in a non-standard manor?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 9
- Joined: Tue Mar 05, 2013 9:54 am
Re: MySQL on Windows - default port 3306
The installer worked great. It was ran on a fresh Windows 2008 install (without any other apps installed). Cacti and MySQL are currently working perfectly via port 3306. Once I can change the port for MySQL (to 3307) and have Cacti point to it, the other app we have should install and work great using MySQL port 3306.
Below is what I've changed so far while trying to change MySQL/Cacti to port 3307.
** my.ini **
[client]
port=3307
# The TCP/IP Port the MySQL Server will listen on
port=3307
** php.ini **
; http://php.net/mysqli.default-port
mysqli.default_port = 3307
After a reboot, I get the following error while bringing up the log in page "FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php' " I'm also still showing 3306 when I do a netstat -a.
netstat -a
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
Below is what I've changed so far while trying to change MySQL/Cacti to port 3307.
** my.ini **
[client]
port=3307
# The TCP/IP Port the MySQL Server will listen on
port=3307
** php.ini **
; http://php.net/mysqli.default-port
mysqli.default_port = 3307
After a reboot, I get the following error while bringing up the log in page "FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php' " I'm also still showing 3306 when I do a netstat -a.
netstat -a
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
TCP 127.0.0.1:3306
Re: MySQL on Windows - default port 3306
Did you also edit the port in include/config.php ? Although per http://bugs.cacti.net/view.php?id=2352 the alternative port might not properly work...chrisbanks00 wrote:After a reboot, I get the following error while bringing up the log in page "FATAL: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'
sysinternals tcpview and process explorer will provide you more details on what process is listening on that port.chrisbanks00 wrote: I'm also still showing 3306 when I do a netstat -a.
Ultimately, you should only need one MySQL installation, but can use different service and config file instances to satisfy the other applications which require it.
Why do you have to use two separate installations anyways?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 9
- Joined: Tue Mar 05, 2013 9:54 am
Re: MySQL on Windows - default port 3306
I only have one install of Cacti. The other installation is for a separate piece of software altogether (centralized wireless management).
In addition to the changes already done in my.ini and php.ini (as shown earlier in this thread), I've also edited the following, along with a reboot.
** config.php ** (located in the include dir under the Cacti folder)
$database_hostname = "localhost:3307";
$database_port = "3307";
This worked! Hopefully this thread will help somebody else in the future.
In addition to the changes already done in my.ini and php.ini (as shown earlier in this thread), I've also edited the following, along with a reboot.
** config.php ** (located in the include dir under the Cacti folder)
$database_hostname = "localhost:3307";
$database_port = "3307";
This worked! Hopefully this thread will help somebody else in the future.
Re: MySQL on Windows - default port 3306
I just wanted to thank chrisbanks00 and BSOD2600 for posting what they did here. I also have an application using a MySQL database, but it's integrated to the point that I really don't think it can be edited. So, cacti needed to be edited. The instructions that chrisbanks00 used worked so that I could login to Cacti and my other application worked, but I was getting no data in Cacti.
One additional detail fixed it. If you're using Spine, edit Spine/spine.conf (with a Unix editor like EditPad Lite):
DB_Port 3307
This was the final fix that got it all working for me. Thanks for the help!
One additional detail fixed it. If you're using Spine, edit Spine/spine.conf (with a Unix editor like EditPad Lite):
DB_Port 3307
This was the final fix that got it all working for me. Thanks for the help!
Who is online
Users browsing this forum: No registered users and 2 guests