Page 2 of 2

Re: Nagios CCM not accessible after changing mysql datadir

Posted: Fri Nov 20, 2020 12:07 pm
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

Re: Nagios CCM not accessible after changing mysql datadir

Posted: Tue Nov 24, 2020 6:54 am
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.

Re: Nagios CCM not accessible after changing mysql datadir

Posted: Tue Nov 24, 2020 9:20 am
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