DataBase error
Posted: Tue Sep 16, 2014 10:04 am
Hello Guys,
I have relocated mysql DB from /var/lib/mysql to /mysql/ and made necessary changes in /etc/my.cnf. every thing is working fine i am able to connect to the DB,
but when i try to access dashboard it gives DB error,
tail -f /var/log/httpd/error_log says:
I have relocated mysql DB from /var/lib/mysql to /mysql/ and made necessary changes in /etc/my.cnf. every thing is working fine i am able to connect to the DB,
Code: Select all
[root@Synoptics-VM01 scripts]# mysql -h localhost -u ndoutils -pn@gweb nagios
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> \q
Bye
tail -f /var/log/httpd/error_log says:
Code: Select all
[root@Synoptics-VM01 ~]# tail -f /var/log/httpd/error_log
[Tue Sep 16 20:33:32 2014] [error] [client ::1] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Tue Sep 16 20:33:32 2014] [error] [client ::1] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Tue Sep 16 20:33:32 2014] [error] [client ::1] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Tue Sep 16 20:33:32 2014] [error] [client 49.248.31.218] PHP Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in /usr/local/nagiosxi/html/includes/utils-backend.inc.php on line 27, referer: http://103.230.84.24/nagiosxi/index.php?
[Tue Sep 16 20:33:32 2014] [error] [client 49.248.31.218] PHP Warning: simplexml_load_string(): Message: A database connection error has been detected, we are attempting to rep in /usr/local/nagiosxi/html/includes/utils-backend.inc.php on line 27, referer: http://103.230.84.24/nagiosxi/index.php?
[Tue Sep 16 20:33:32 2014] [error] [client 49.248.31.218] PHP Warning: simplexml_load_string(): ^ in /usr/local/nagiosxi/html/includes/utils-backend.inc.php on line 27, referer: http://103.230.84.24/nagiosxi/index.php?
[Tue Sep 16 20:33:32 2014] [error] [client 49.248.31.218] PHP Notice: Undefined variable: count in /usr/local/nagiosxi/html/includes/utils-xmlstatus.inc.php on line 954, referer: http://103.230.84.24/nagiosxi/index.php?
[Tue Sep 16 20:33:41 2014] [error] [client ::1] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Tue Sep 16 20:33:42 2014] [error] [client ::1] PHP Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383