Again this trouble. Already read all topics here, but no one doesn't help
So, I've installed Cacti and write info to config file. After that I open browser and see that:
PHP ini info:FATAL: Connection to Cacti database failed. Please ensure:
the PHP MySQL module is installed and enabled.
the database is running.
the credentials in config.php are valid.
Code: Select all
# php --ini
Configuration File (php.ini) Path: /usr/local/etc
Loaded Configuration File: /usr/local/etc/php.ini
Scan for additional .ini files in: /usr/local/etc/php
Additional .ini files parsed: /usr/local/etc/php/ext-18-session.ini,
/usr/local/etc/php/ext-20-bz2.ini,
/usr/local/etc/php/ext-20-ctype.ini,
/usr/local/etc/php/ext-20-filter.ini,
/usr/local/etc/php/ext-20-gd.ini,
/usr/local/etc/php/ext-20-gettext.ini,
/usr/local/etc/php/ext-20-gmp.ini,
/usr/local/etc/php/ext-20-hash.ini,
/usr/local/etc/php/ext-20-json.ini,
/usr/local/etc/php/ext-20-ldap.ini,
/usr/local/etc/php/ext-20-mbstring.ini,
/usr/local/etc/php/ext-20-mysqli.ini,
/usr/local/etc/php/ext-20-openssl.ini,
/usr/local/etc/php/ext-20-pdo.ini,
/usr/local/etc/php/ext-20-posix.ini,
/usr/local/etc/php/ext-20-simplexml.ini,
/usr/local/etc/php/ext-20-snmp.ini,
/usr/local/etc/php/ext-20-sockets.ini,
/usr/local/etc/php/ext-20-xml.ini,
/usr/local/etc/php/ext-20-zip.ini,
/usr/local/etc/php/ext-20-zlib.ini,
/usr/local/etc/php/ext-30-pdo_mysql.ini
Code: Select all
# php -v
PHP 7.2.14 (cli) (built: Jan 30 2019 12:19:04) ( ZTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
Code: Select all
# php -m
[PHP Modules]
bz2
Core
ctype
date
filter
gd
gettext
gmp
hash
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
posix
Reflection
session
SimpleXML
snmp
sockets
SPL
standard
xml
zip
zlib
[Zend Modules]
Code: Select all
$database_type = 'mysql';
$database_default = 'cacti';
$database_hostname = 'localhost';
$database_username = 'cacti';
$database_password = 'cacti';
$database_port = '/tmp/mysql.sock';
$database_ssl = false;
$database_ssl_key = '';
$database_ssl_cert = '';
$database_ssl_ca = '';
Code: Select all
# cat php.ini | grep mysql.default_socket
pdo_mysql.default_socket=
mysql.default_socket = /tmp/mysql.sock
Code: Select all
# sockstat | grep mysql
mysql mysqld 65019 67 stream /tmp/mysql.sock
mysql mysqld 65019 69 stream /tmp/mysqlx.sock
mysql mysqld 65019 70 stream /tmp/mysql.sock
www httpd 63700 9 stream -> /tmp/mysql.sock
Code: Select all
vovas@beast:~ % mysqladmin --protocol=SOCKET --socket=/tmp/mysql.sock -u root -p version
Enter password:
mysqladmin Ver 8.0.14 for FreeBSD11.2 on amd64 (Source distribution)
Copyright (c) 2000, 2019, 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.
Server version 8.0.14
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 24 min 59 sec
Threads: 2 Questions: 3 Slow queries: 0 Opens: 110 Flush tables: 2 Open tables: 86 Queries per second avg: 0.002