Nagios CCM not accessible after changing mysql datadir

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios CCM not accessible after changing mysql datadir

Post by scottwilkerson »

These errors are from PHP, if you change the socket path you are also going to need to update the /etc/php.ini making th efollowing changes

Code: Select all

[Pdo_mysql]
pdo_mysql.default_socket=/nagiosdb/mysql/mysql.sock

[MySQLi]
mysqli.default_socket =/nagiosdb/mysql/mysql.sock
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Nagios CCM not accessible after changing mysql datadir

Post by rajasegar »

scottwilkerson wrote:These errors are from PHP, if you change the socket path you are also going to need to update the /etc/php.ini making th efollowing changes

Code: Select all

[Pdo_mysql]
pdo_mysql.default_socket=/nagiosdb/mysql/mysql.sock

[MySQLi]
mysqli.default_socket =/nagiosdb/mysql/mysql.sock
It works fine now. This needs to be documented in the Nagios FAQ.
I also saw a section called [MySQL] in php.ini. Updated the default socket on it also.

Thanks for your help.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios CCM not accessible after changing mysql datadir

Post by scottwilkerson »

rajasegar wrote:
scottwilkerson wrote:These errors are from PHP, if you change the socket path you are also going to need to update the /etc/php.ini making th efollowing changes

Code: Select all

[Pdo_mysql]
pdo_mysql.default_socket=/nagiosdb/mysql/mysql.sock

[MySQLi]
mysqli.default_socket =/nagiosdb/mysql/mysql.sock
It works fine now. This needs to be documented in the Nagios FAQ.
I also saw a section called [MySQL] in php.ini. Updated the default socket on it also.

Thanks for your help.
great!

I will send this over to get documented.

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked